Professional Web Applications Themes

PDWordFinder and PDETextGetText , How to get font, color...>? - Adobe Acrobat SDK

>2. PDETextGetText to GetText, I know I can get format information, but I cannot extract the correct character, the text I extracted are all unreadable character? Your code is only returning the internal representation of the characters, not translating it using the encoding/CID of the font. Aandi Inston...

  1. #1

    Default PDWordFinder and PDETextGetText , How to get font, color...>?

    >2. PDETextGetText to GetText, I know I can get format information, but I cannot extract the correct character, the text I extracted are all unreadable character?
    Your code is only returning the internal representation of the
    characters, not translating it using the encoding/CID of the font.

    Aandi Inston
    Aandi_Inston@adobeforums.com Guest

  2. #2

    Default PDWordFinder and PDETextGetText , How to get font, color...>?

    I use 2 methods to develop a plugin
    1. PDWordFinder to extract text(Japanese & Chinese character), I can extract the text, but I donnot know how to get the text format information.
    2. PDETextGetText to GetText, I know I can get format information, but I cannot extract the correct character, the text I extracted are all unreadable character?

    How should I do, Please give me some hints, Thank you.

    Method PDWordFinder=============
    PDWordFinderConfigRec pConfig;
    memset(&pConfig,0,sizeof(PDWordFinderConfigRec));
    pConfig.recSize = sizeof(PDWordFinderConfigRec);
    pConfig.ignoreCharGaps = true;
    pConfig.ignoreLineGaps = true;
    pConfig.noAnnots = true;
    pConfig.noEncodingGuess = true;

    //Create a PDWordFinder object
    PDWordFinder pdWordFinder = PDDocCreateWordFinderEx(currentPDDoc, WF_LATEST_VERSION, false, &pConfig);
    //Create a callback function
    PDWordProc wordProc = NULL;
    wordProc= ASCallbackCreateProto(PDWordProc, &wordEnumerator);
    //Extract and display words
    PDWordFinderEnumWords(pdWordFinder, pageNumber-1, wordProc, NULL);
    PDWordFinderDestroy(pdWordFinder);
    =================================================

    PDETextGetText===================================
    // // if(PDEObjectGetType((PDEObject)pdEle)==kPDEText)
    // // {
    // // int numRuns=PDETextGetNumRuns((PDEText)pdEle);

    // // ASInt32 blen;
    // // for(int currentRun=0;currentRun<numRuns;currentRun++) // // { // // blen=PDETextGetText((PDEText)pdEle,kPDETextRun,cur rentRun,NULL); // // ASUns8* ch = new ASUns8[blen]; // // PDETextGetText((PDEText)pdEle,kPDETextRun,currentR un,ch); // // char* str = ((char *)ch);

    // // AVAlertNote(str);
    // // }
    // // }
    =================================================
    wangzhonghua@adobeforums.com Guest

  3. #3

    Default Re: PDWordFinder and PDETextGetText , How to get font, color...>?

    Which API should I use to translate it?
    I didnot find the API
    COuld you tell me?

    Thank you

    Jason Wang
    wangzhonghua@adobeforums.com Guest

Similar Threads

  1. How to change the font, the font size, and color text
    By David_Gopois@adobeforums.com in forum Adobe Acrobat SDK
    Replies: 1
    Last Post: October 29th, 03:47 AM
  2. PDWordFinder - Setting characters used to break up words
    By Eliott_Hayut@adobeforums.com in forum Adobe Acrobat SDK
    Replies: 21
    Last Post: October 16th, 03:06 AM
  3. How to decode PDETextGetText's result?
    By wangzhonghua@adobeforums.com in forum Adobe Acrobat SDK
    Replies: 0
    Last Post: September 16th, 04:01 PM
  4. font, font size, background color preferences
    By Jim_Slim@adobeforums.com in forum Adobe Acrobat Macintosh
    Replies: 1
    Last Post: July 10th, 02:37 PM
  5. Fieldmember Font color
    By Ayla Asperger webforumsuser@macromedia.com in forum Macromedia Director Lingo
    Replies: 1
    Last Post: December 2nd, 02:57 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139