Chinese character extraction:

Ask a Question related to Adobe Acrobat SDK, Design and Development.

  1. #1

    Default Chinese character extraction:

    Hi i wonder to extract Chinese character, anyone can give me some guidelines?
    I use AVTextCopyProcCBExtract proc to extract english word, which callback is used to extract the chinese character?

    Thanks your concern.

    Regards,
    Tham
    cstham@adobeforums.com Guest

  2. Similar Questions and Discussions

    1. Showing Chinese character:
      I wonder to show a chinese word in AVAlertNote, is it possible? Please give me some guidelines if it can. Thanks your concern. Regards, Tham
    2. CF 5 or MX 7 support chinese character?
      Does any one know if CF 5 or MX 7 support chinese character or not? if so, what kind of additional file or extension i need to install? Can i use...
    3. Chinese Character in SQL 2000
      Hi, I know someone has asked similar question but the solution in this forum seems can't help me. I am now using SQL 2000 (ENG version) and...
    4. display chinese character
      hi, i wonder why dreamweaver can't display the chinese character that i entered...boxes appeared; but correct chinese characters display in...
    5. Chinese Character in Director?
      I am using English WinXP and English DirectorMX. I need to produce a Chinese-CD, and I am facing difficulties in embeding the fonts into director....
  3. #2

    Default Re: Chinese character extraction:

    Did you read the documentation for AVDocGetPageText()? It is very clear about how to get Unicode text:

    IN/OUT The format in which the text is desired. The following are allowed values (these strings must be converted to ASAtom objects using ASAtomFromString()): Allowed value Description All (Mac OS/Windows) Calls copyProc once with each available format. Text (Mac OS/Windows) Calls copyProc twice. The first time, it passes the text in the specified selection. The text is passed using the same platform encoding as when it is put onto the clipboard (format = Text ). The second time, it passes a Unicode version of the text (format = UCSText ). Style (Mac only) Calls copyProc twice. The first time, it passes the Text representation. The second time, it passes a StyleInfo record. RTF (Mac OS/Windows) Calls copyProc twice. The first time, it passes the text in Rich Text Format. The second time, it passes a Unicode version of the text. Upon using or manipulating the text, you should check the format in copyProc .
    Leonard_Rosenthol@adobeforums.com Guest

  4. #3

    Default Re: Chinese character extraction:

    I use code below to extract chinese character but it didn't function (the callback doesn't work). Any mistake i make?

    AVTextCopyProc cbAVTextCopyProc = ASCallbackCreateProto(AVTextCopyProc, &AVTextCopyProcCBExtract);

    AVDocGetPageText(avDoc, pageNum, ts, ASAtomFromString("UCSText"), cbAVTextCopyProc, NULL);
    ASCallbackDestroy((void*)cbAVTextCopyProc);

    Thanks your concern.

    Regards,
    Tham
    cstham@adobeforums.com Guest

  5. #4

    Default Re: Chinese character extraction:

    Ya i use AVDocGetPageText(avDoc, pageNum, ts, ASAtomFromString("RTF"), cbAVTextCopyProc, NULL) and it shows me the unicode. But i want show the chinese character in an AVAlertNote, how can i use ASText to show? Is it AVAlertNote((char*)(ASText)pBuf) since it AVAlertNote only support "char*" type? Please give me some guides.

    Thanks your concern.

    Regards,
    Tham
    cstham@adobeforums.com Guest

  6. #5

    Default Re: Chinese character extraction:

    Nice to see you recieved the Unicode data as expected when you followed the documentation.

    Now, as noted in the other email, do the same things for ASText - read the docs and look at the samples!
    Leonard_Rosenthol@adobeforums.com Guest

  7. #6

    Default Re: Chinese character extraction:

    Below is the code i am trying to show chinese character in an ANVlertNote. But it's failed. It's showed nothing in the AVAlertNote. Please insists me where is wrong?

    ASText asText = NULL;
    ASUnicodeFormat uFormat = kASSimplifiedChineseScript;
    asText = ASTextFromUnicode ((const ASUns16*)pBuf, uFormat);
    AVAlertNote((char*)asText);

    Thanks your concern.

    Regards,
    Tham
    cstham@adobeforums.com Guest

  8. #7

    Default Re: Chinese character extraction:

    I thought we went over this already - you can NOT coerce an ASText to a char* that way..

    Please review the documentation on ASText.
    Leonard_Rosenthol@adobeforums.com Guest

  9. #8

    Default Re: Chinese character extraction:

    I use ASTextSetPDText(asText, pInfo) and ASTextSetScriptText (asText, pInfo, kASSimplifiedChineseScript) to convert asText to char* to show but it still shows nothing in AVAlertNote. Is this function wrong? Please give me some guides

    Thanks your concern.

    Regards,
    Tham
    cstham@adobeforums.com Guest

  10. #9

    Default Re: Chinese character extraction:

    ASTextSetXXX convert from SOMETHING to ASText. You need to convert ASText TO SOMETHING - try ASTextGetXXXX
    Leonard_Rosenthol@adobeforums.com Guest

Posting Permissions

  • You may not post new threads
  • You may 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