Retrive two byte string from indesign document

Hello All ,
I want to retrive two byte character string from indesign document.
The way I use to retrive text from indesign I get it in WideString format which is 32 bit value.
When I convert WideString to PMString I get string which represent characters
eg. if WideString is E20F then
PMString to GetCString is 45323046 //represent character position
I want to put logic to left shift E with 4 and , OR next byte 2
i.e E<<4 => E0 | 2 => E2 .
But not able to retrive value of char as E but I get it as 45 which is character position in font.
I want char *str should contained 1 byte->E2 and 2 byte->0F
I want to convert WideString to 2 byte string , Please give solution.
Regards,
Pallavi.

Hello T Schneider ,
Thanks for Reply.
using below code I am able to get Widestring in uchar16 * format.
WideStringConstUTF32Iter iter = wsText.begin();
WideStringConstUTF32Iter last = wsText.end();
uchar16 * wstwobyte = (uchar16 *)malloc(sizeof(uchar16)* wstringlen);
int k =0;
while(iter != last)
* wstwobyte = *iter;
iter++;k++; wstwobyte++;
*wstwobyte = (uchar16 )'\0';
But how to end the uchar16 string, and iterate it again.
I want to pass this string to a function having datatype for input string as usigned short * .

Similar Messages

  • I have two companies sending me indesign documents. One opens up and the dictionary is set to English. The other file opens at is in Hebrew, Not sure how to fix the Hebrew part and whether or not the fualt lies at my end or at the other end

    I have two companies sending me indesign documents. One opens up and the dictionary is set to English. The other file opens at is in Hebrew, Not sure how to fix the Hebrew part and whether or not the fault lies at my end or at the other end

    If only the language is Hebrew, you should correct it in the Paragraph and Character Styles.
    But in such a case I would expect more problems.
    If you are a creative cloud subscriber you should additionally install the InDesign version, English with Hebrew support:
    Go to the preferences of you CC.app. It is found behind the Gear Symbols on the top right.
    When the preferences open, go to the Apps section.
    Change the App Language to English with Hebrew support.
    Now you can install it. It will install on the very same place where your InDesign program is found some additional plugins, which will give you access to Hebrew functionality, like RTL text. Otherwise you will inherit in the document (and where you copy and paste it from such a document into another one). But now you can change or repair problems.
    Now repeatstep 1 + 2, but you need not to install your own language again. InDesign will now, when started, run in the language of your OS (when you have it installed in that language) but with more functionality to handle problems with Hebrew documents.
    The same steps you would have to do with Arabic or Asian documents. These languages will also add more plugins. But keep it limitted to those language you need. I have installed it that way, because I get sometime documen where the text flows the wrong direction or the numbers come up in Farsi digit, not in Arabic digits. For such purposes I need versions in languages I don’t understand myself.

  • Missing Plug-ins - Package And Preflight.APLN from InDesign Document

    If a user creates a file in InDesign CC and then tries to open it in InCopy CS6 they get the following error.
    Missing Plug-ins, Cannot Open File
    PACKAGE AND PREFLIGHT.APLN
    The Doument "filename.indd" uses one or more plug-ins which are not currently available on your system. Do you want to open anyway?
    This happens whether the copy of InCopy is on the same PC as InDesign or a seperate PC without InDesign. InCopy is installed seperately from the CC.
    Clicking OK opens the file normally.
    We have checked that both versions of the software match at v8.0.2.
    I've heard it might be due to embedding of this file but the designers say they are not yet at the stage of packaging this file when they get this error so nothing should be embedded.
    Can anyone help?
    Simon

    Hi, Thanks for pointing out the error.
    I have checked back with our designer and found out that they are using InDesign CS6 and not CC. (I was confused as they used CC to install it rather than our seperate deployment tool).
    The problem however remains the same.

  • Issue in PDF export from InDesign CS4

    Hi,
    We are facing one issue while creating  PDF file from the InDesign document. The document has 2-column texts created in InDesign CS4 application.
    The issue is, we export the PDF from InDesign document. When we open the PDF in Acrobat and selecting the text (using selection tool), the second column text is selected first and then it selects the first column text. So while copying the content from the PDF, it comes is reverse order (that is Second column text, then first column text).
    Could anyone suggest me how to solve this issues.  Is this bug in ID CS4?
    Thanks,
    Gopal

    Hi Uwe,
    Below is the answer to your question.
    Question: Did you set the "TouchUp Reading Order" in the preferences of your Acrobat other than "Left to Right, Top to Bottom"?
    Answer: No, we did not change the Touchup Reader order. It is in "Left to Right, Top to Bottom"
    Question: What version of Acrobat Pro are you using? Or is it just Adobe Reader?
    Answer: We are using Adobe Acrobat 9 Pro version. We tested in Adobe reader X (VER 10.1.3). But the same problem exists.
    Question: What kind of tool are you using? it the "TouchUp Text Tool"? Or is it the "Select Tool"?
    Answer: We used both Select Tool and TouchUp Text Tool. Both selects the text in reverse order. (that is right column to Left column)
    Please help me on this issue.
    Thanks,
    Gopal

  • How to place two different indesign documents side by side on my desktop in order to copy and paste images and text from one to the other?

    How to place two different indesign documents side by side on my desktop in order to copy and paste images and text from one to the other?

    Or choose Window > Arrange > Tile
    And, you of course can copy/paste without tiling.

  • Garbage text prints when printing documents from InDesign

    I am encountering an odd error when printing from InDesign 4.0.4 (CS2) to some HP printers (HP 4650 and 2430n). Some documents print just fine with no problems. But a couple of documents will either never print, or when they do print, they print a line or few of garbage text (black diamonds, smiley faces, etc.) per page, plus some blank pages, and it will run through tons of paper when it does this.
    I've found the following document which describes my problem pretty closely.
    http://h10025.www1.hp.com/ewfrf/wc/genericDocument? docname=c00028613&cc=us&dlc=en&lc=en&jumpid=regR1002USEN
    The problem is that I have set the Graphics to print as ASCII, and this problem still occurs. Could it be a problem with a particular EPS file printing or something? This document (with all of the included text, EPS images, etc) become fairly sizeable, such as 150 MB in size. The HP 4650 has 512 MB of memory, whereas the HP 2430 has 64 MB of memory.
    I printed this same problem document from another computer, with all of the same settings in InDesign, and it printed with no problems.
    Any idea on what is going on here?

    Hello Chad,
    Do you know if the two printers support PostScript? It sounds like they don't and therefore they will be using filters to convert the PS data from InDesign into a format that it understood by the printer. It will be in this conversion process that something will be going astray and that will cause the corrupted output. Try running a Repair Disk Permissions to see if this helps.
    I don't believe the amount of RAM will cause the problem, it should only impact the speed at which the document can be spooled from the Mac. However, if the error is only occuring from InDesign and when working with large files, then it may have something to do with it. But if the other PC is okay then it may rule out the RAM. What print language is the other PC using to print to the HP's?
    Regards,
    Paul

  • Finding then combining content from several indesign documents in one document

    Hi everyone,
    I wonder if someone can help...
    I'm trying to write scripts for indesign server which I want to:
    a) search for,
    b) pick out, then
    c) put together content from one or many indesign documents into a template on the server starting at a pre-defined point in the template. 
    After that we produce a pdf of the document to pass on / do whatever. I've got so far with the scripting documentation but I'm stuck!  This is what I've done so far:
    1/ create a document template with a script
    2/ add text elements to the document template (header and footnote, title,       body text i.e. intro and data, and the contact details)
    3/ add text / content from another indesign file into this       document (so far only done it with a .txt file) ...
    ... I'm stuck on the indesign documents at the moment.  I have       looked at various options, the most appropriate way I can see in       the manuals to get content from one document to another is by       duplicating.  My understanding is to do this you have to target the text in the source       document, duplicate it and then add it into a text frame on the       target document.  It's the targettting of the text and surrounding       elements in the source document I'm battling with. 
    any ideas on how I go about this effectively? 
    Any help and advice appreciated!

    The story so far...
    I've added the code kindly provided by getZinger (thanks again!) and am now stuck on the next stage, .  I've commented the code where I'm having problems, and essentially have two key issues to resolve:
    1/ how I get the documents to be placed one after the other, avoiding the overlay I get on the first insertion page.
       (I am using a fixed value as an insert point as the template I'm using will always have inserts starting on page 3).
    2/ how I access the pdf's I want to insert from a location other than C:\Users\Whoever\Documents\
    try{
    for(myCounter = app.documents.length; myCounter > 0; myCounter--){
    app.documents.item(myCounter-1).close (SaveOptions.no);
      myDocument = app.open(File("C:/.../template.indd"));
      myPDFFiles = ["pdf1.pdf","pdf2.pdf","pdf3.pdf"];
    insertPdf();
    function insertPdf(){
    //I've gone for a static number here as the datapage in the skeleton doc  is page 3.
    //This seems to result in some of the pages being placed on top of each  other :-(
        var myPage = myDocument.pages.item(2);
        /*var myPageNames = new Array;
        //Get the names of the pages in the document
        for(var myCounter = 0; myCounter < myDocument.pages.length;myCounter++){
            myPageNames.push(myDocument.pages.item(myCounter).name);
        var myPDFSet = File("C:/Users/Simon/Desktop/Mexico.pdf");
        for(myIndex=0;myIndex<myPDFFiles.length;myIndex++){
        myPDFSet = File(myPDFFiles[myIndex])
        myPlacePDF(myDocument, myPage, myPDFSet);
        myDocument.exportFile(ExportFormat.pdfType, new File("C:/.../test_insert.pdf"), false);
        myDocument.close(SaveOptions.no);
    }catch(e) { myDocument.close(SaveOptions.no); }
    function myPlacePDF(myDocument, myPage, myPDFSet){
    var myPDFPage;
    app.pdfPlacePreferences.pdfCrop = PDFCrop.cropMedia;
    var myCounter = 1;
    var myBreak = false;
    while(myBreak == false){
    if(myCounter > 1){
    myPage = myDocument.pages.add(LocationOptions.after, myPage);
    app.pdfPlacePreferences.pageNumber = myCounter;
    //the files seem to be automatically placed from C:\Users\Whoever\Documents
    //I need to change this to accept a different file path somehow but I  don't know how
    //this is why the myPDFFiles array only has filenames at the moment
    myPDFPage = myPage.place(File(myPDFSet), [0,0])[0];
    if(myCounter == 1){
    var myFirstPage = myPDFPage.pdfAttributes.pageNumber;
    else{
    if(myPDFPage.pdfAttributes.pageNumber == myFirstPage){
    myPage.remove();
    myBreak = true;
    myCounter = myCounter + 1;
    once again, thanks for taking the time to read this, any help greatly appreciated :-)

  • On Windows Platform, encounters error when trying to open an Indesign document created from MAC

    Hi all,
    On Windows Platform, encounters error when trying to open an Indesign document in INDD format created from Mac. Error received "Either the file does not exist, you do not have permission, or the file may be in use by other application". I am currently using Adobe Indesign CC 9.2 Trial version.
    Kindly advise how can i open this document on windows platform and allows me to edit the document.
    Thanks!
    With Rgds,
    Fiona Choy

    Normally there is no problem to open any INDD opening on Windows, when created on the Mac.
    But Mac user are often not aware on the naming limitations. A file name must not contain /, \, |, :
    It should not contain any extended character, it is not a primary problem but will be, if something links to that file, so avoid also: ÄÖÜäöüß+&
    You can use all other non A-Z a-z, 0-9 and - and  _
    I personally would also recommend to avoid spaces.
    This is valid for the INDD file itself but also for all linked content.

  • Is there a way to trace back an indesign document from which a certain jpeg was exported?

    I have a jpeg image that was exported from indesign a long time ago. I no longer know where the indesign file is located or it's name, but I need to edit the text of the jpeg and the only way to do that is by editing the original indesign document and reexporting it. Is there a way to trace back an indesign document from which a certain jpeg was exported?

    boshalosh wrote:
    I have a jpeg image that was exported from indesign a long time ago. I no longer know where the indesign file is located or it's name, but I need to edit the text of the jpeg and the only way to do that is by editing the original indesign document and reexporting it. Is there a way to trace back an indesign document from which a certain jpeg was exported?
    Depending on how the text interacts visually with the image, it might be possible to use the fill property of the content-aware deletion feature of recent Photoshop versions to remove the text with little or no evidence of the deletion, then apply text over the graphic however you like.
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices

  • Copying a page from one InDesign document to another

    I have a page in an InDesign document (which contains graphics) that I would like to copy to another InDesign document, but Copy / Past does not work.

    Have both files open...
    In the source file open the pages panel and select the page(s) you want to copy, from the panel menu choose move page(s), and select the destination file and specify a position.

  • Is there a way to find and replace prices in an Indesign document from a CSV file?

    Is there a way to find and replace prices in an Indesign document from a CSV file. Currenty I have a catalog with codes and prices in tables. I need to find a way to look up the code (and new price) in the CSV file and overwrite the price in the current table with the new price. Does anyone know of a script to run this quickly?

    Hi,
    Try this
    1) with all the images showing, got to Find -> By caption or Note
    2) enter the caption you are looking for Image Description and click on OK
    It should display all the ones with that caption
    3) select a few images as a test
    4) go to Edit -> Add caption to selected items
    5) if you want to blank out the captions just check the box to replace the caption and click on ok
    6) You will need to confirm the blank captions
    You could use a similar procedure to change the caption to something else.
    Good luck
    Brian

  • How to create a smallest file size pdf from indesign CS4 document

    How to create a smallest file size pdf (suitable for upload to a website) from indesign CS4 document which contains multiple illustrator CS4 illustrations.
    I have chosen the "smallest file size option" but the pdf file is over 30MB, can anyone help please.
    Thank you

    One trick is to
    Set the placed graphics to have a transparency of 99.9% (you can do this with Find/Change and select Objects)
    This is enough to force the graphics throught the Transparency Flattener
    Next set the Transparency Blend Space to RGB (Edit>Transparency Blend Space)
    Next set a custom Transparency Flattner Preset Edit>Transparency Flattner
    Next
    Use File>Export and choose
    Smallest file size
    PDF Compatibility Acrobat 4 (PDF 1.3)
    In Advanced Section - go to transparency and selec the new Flattener Preset you created.
    *this will convert your vectors to raster, but it should reduce your file size

  • Converting an InDesign document from English into Mandarin (Chinese)

    Using a Mac OS X Version 10.7.5. InDesign CS 5.5
    A 4 page layout in English needs translating to Mandarin (Chinese). I have been provided the copy in Mandarin in a Word document.
    Most of the Word doc looks fine other than a few characters show as rectangles.
    I then asked the client to copy and paste each of the four pages into an email, all of the characters showed were in Mandarin.
    I then copied and pasted from the email into the InDesign document only to find every character came up as a squares encased in a pink line.
    I have reset the settings on the Mac in System Prefs and changed to Chinese (as there's no setting for Mandarin), it has made no difference what so ever.
    Apple have advised InDesign has trouble with Asian fonts esp. double bite fonts.
    I do not have the seriel number for InDesign on me and therefore Adobe will not assist in this matter.
    Can anyone help please?

    Pink Piranha wrote:
    A 4 page layout in English needs translating to Mandarin (Chinese). I have been provided the copy in Mandarin in a Word document.
    Most of the Word doc looks fine other than a few characters show as rectangles.
    I then asked the client to copy and paste each of the four pages into an email, all of the characters showed were in Mandarin.
    I then copied and pasted from the email into the InDesign document only to find every character came up as a squares encased in a pink line.
    Apparently the font applied to the text in InDesign does not contain Chinese characters. Select one that does.
    I have reset the settings on the Mac in System Prefs and changed to Chinese (as there's no setting for Mandarin), it has made no difference what so ever.
    That merely changes the interface, doesn't it? Your documents would not change -- all of your e-mails, for example, are still in English, right?
    Apple have advised InDesign has trouble with Asian fonts esp. double bite fonts.
    Don't worry about that, Apple doesn't know anything about fonts, advanced typesetting, PDFs, color management ...

  • Drop an URL on a InDesign document from a Flex panel

    Hi Everyone,
    I have a Flex panel, in InDesign, from which I drag an URL. If I drop this URL on a text editor or a web browser, it works. But when I try to drop it on my InDesign document, it's a little bit harder.
    I have implemented a subclass of CDragDropTargetFlavorHelper. The drop works perfectly on Windows. But on mac, I have problems in the method CouldAcceptTypes :
    DragDrop::TargetResponse
    AutocatDNDCustomFlavorHelper::CouldAcceptTypes(const IDragDropTarget* target, DataObjectIterator* dataIter, const IDragDropSource* fromSource, const IDragDropController* controller) const
                   if (0 != dataIter && 0 != target)
                DataExchangeResponse response = dataIter->FlavorExistsWithPriorityInAllObjects(kURLDExternalFlavor);
                                  if (response.CanDo())
    The problem is that response.canDo() answers kTrue on Windows, but kFalse on Mac. I tried to explore the content of dataIter, but a call on dataIter->First() returns nil. I tried a controller->GetItemCount(), which returns 1. But if I try a controller->GetDragItem(1), I get a nil pointer. I have the impress there is no item.  Though, the drop works on another app than InDesign, as I said.
    Is it a problem of internalization ? Or something else ? It let me dry.
    Thanks in advance

    Hi,
    I solved this problem, but discovered another one. The flavor sent by the flex panel has been changed, so that it's a text flavor instead of an URL flavor. My method couldAcceptType works now :
    DragDrop::TargetResponse
    AutocatDNDCustomFlavorHelper::CouldAcceptTypes(const IDragDropTarget* target, DataObjectIterator* dataIter, const IDragDropSource* fromSource, const IDragDropController* controller) const
         if (0 != dataIter && 0 != target)
              // Check for URL Flavor in the drag
              DataExchangeResponse response = dataIter->FlavorExistsWithPriorityInAllObjects(kTEXTExternalFlavor);
                   if (response.CanDo())
                        return DragDrop::TargetResponse(response, DragDrop::kDropWillCopy);
         return DragDrop::kWontAcceptTargetResponse;
    The problem is now in the ProcessDragDropCommand method. Here is the code :
    ErrorCode AutocatDNDCustomFlavorHelper::ProcessDragDropCommand(IDragDropTarget*                               target, IDragDropController* controller, DragDrop::eCommandType                    action)
           // retrieve drop data
                   IPMDataObject* dragDataObject = controller->GetDragItem(1);
                   uint32 dataSize = dragDataObject->GetSizeOfFlavorData(kTEXTExternalFlavor) ;
    The problem is the IMPDataObject I get is nil. There is no item in the controller. However, there were items in the CouldAcceptTypes method, in the DataObjectIterator. So, where are my items ?
    I tried using a custom CDataExchangeHandlerFor, but could not really understand what its usage was for. It didn't work anyway.
    Has anyone an idea ?
    Regards,
    Rémi

  • Script for replacing Image from a frame into InDesign document file

    Hi All,
    I am having an indesign document (indd) file with images and texts. I am using InDesign Server CS4 to run the scripts via SOAP.
    My requirement is to replace any of the images from the required frame/s of indesign document through scripting (I already have frame id of which image needs to be replaced). I have written written java-script file (as given below): but when I execute this java-script on InDesign Server via SOAP, I get follwoing error into InDesign Server:
    10/03/09 15:15:54 INFO  [javascript] Executing File: \\Server_IP_Address\JavaScript_File_Path\JavaScript_File.js
    10/03/09 15:16:01 ERROR [link manager] Link missing.; file:C:/help.gif
    10/03/09 15:16:01 ERROR [link manager] Link missing.; file:C:/Documents%20and%20Settings/All%20Users/Documents/My%20Pictures/Sample%20Pictures/ Water%20lilies.jpg
    10/03/09 15:16:01 ERROR [link manager] Link missing.; file:C:/Documents%20and%20Settings/All%20Users/Documents/My%20Pictures/Sample%20Pictures/ Winter.jpg
    Following is the java-script that is being used for replacing image from indd's frame:
    var myDocument = app.open(File('//Server_IP_Address/InDesignDocument_File_Path/Sample.indd'));
    var tmp_frmid="1339"; //frame id of which image needs to be replaced.
    for (var i=0;i<myDocument.pages.length;i++)
    var objPage=myDocument.pages.item(i);
    var objPageitems = objPage.pageItems;
    try
    var obj = objPageitems.itemByID(tmp_frmid);
    obj.images[0].remove;
    obj.appliedObjectStyle = null;
    var myImage=obj.place(File('//Server_IP_Address/Images_to_be_reolaced_Path/ImageFile.jpg'));
    var old_height = myImage.geometricBounds[2] - myImage.geometricBounds[0];
    var new_height = obj.geometricBounds[2] - obj.geometricBounds[0];
    var old_width = myImage.geometricBounds[3] - myImage.geometricBounds[1];
    var new_width = obj.geometricBounds[1] + ((new_height / old_height) * old_width);
    myImage.geometricBounds = [obj.geometricBounds[0] + "mm", obj.geometricBounds[1] + "mm", obj.geometricBounds[2] + "mm", new_width + "mm"];
    var diff = obj.geometricBounds[1] - myImage.geometricBounds[1];
    myImage.move( undefined, [diff,0] );
    break;
    catch(e)
    myDocument.save('//Server_IP_Address/InDesignDocument_File_Path/Sample.indd');
    var previewFile = File('//Server_IP_Address/Images_to_be_reolaced_Path/ImageFile.jpg');
    app.jpegExportPreferences.jpegQuality["JPEGOptionsQuality.low"];
    app.documents.item(0).exportFile(ExportFormat.jpg, previewFile);
    myDocument.close();
    I have very urgent requirement; if anyone have any idea; please suggest me. \
    It would be highly appreciable.
    Kind Regards,
    Prashant.

    http://www.automatication.com/selection-to-pdf-script.html
    Harbs
    http://www.in-tools.com

Maybe you are looking for

  • Query multiple keywords from one string

    Hi, I'm trying to build a search page that will give users a keyword search field and search my oracle database for all keywords entered. I guess I need to look for spaces in the string and seperate out into an array, then build the sql dynamically f

  • Python / GtkSourceView

    Is it me or every python applications that use gtksourceview are broken (Scribes and some customs applications I've made) ? Seems like it's not included anymore in gnome-python-extras-2.14. And the pygtksourceview binding in AUR is deprecated. Anyone

  • Find the last character in an aplhanumreic string

    Hi guys first time poster long time hiding in the shadows, hopefully someone can help me I have set of username stored and I need to find the last character before the number for example abc123 I would want to find c ab123 I would want to find b any

  • No sound in call since 5.0.2 update!

    Sony, I recently updated my Z3C to 5.0.2 and have not been able to make a call since! When I call someone, the phone dials through and connects, the mic is active, and the person at the other end can hear me, but I can't hear anything through my earp

  • How do I recover a deleted mail account and all associated contacts?

    How do I recover a deleted mail account and all associated contacts?