Support for Chinese character?

  • myinterest

    myinterest - 2010-08-06

    Is Chinese character supported? I got a Key Not Found exception when trying to stamp some Chinese characters on an existing PDF document. The same code works just by supplying English text instead of Chinese.


  • lemoned

    lemoned - 2010-08-27

    i am also facing the same problem with chinese characters.  I only missing this 1 more step then my program is almost done.  hope to hear you soon.


  • Stefano Chizzolini

    I'd like to hear some more info about the way you apply chinese characters: what kind of font technology are you using? OpenType/TrueType or what else?

    Thank you,

  • lemoned

    lemoned - 2010-09-02

    Hi Stefano,

    I am still new with pdfclown and the structure of pdf, forgive me if whatever i say doesn't make sense. 

    So basically my task is to take a pdf in some language (e.g. english), then extract the text inside and translate it into another language (e.g. chinese) and lastly write it back to a brand new pdf.  My program can now successfully extract the text (similar for the example that in the package) and translated the language.  But now my task is stuck at to write the chinese characters back into another brand new pdf file.  Since i need a correct codepoint mapping for the chinese character, i have to change to a new font, , i m currently investigating on how to set the new font while keeping the settings (position/color/font size) the same. 

    I am trying to re-construct a it.stefanochizzolini.clown.documents.contents.objects.Text object using the new font.  The fonts that i use is some standard font found in adobe (e.g. AdobeFangsongStd-Regular.otf/AdobeHeitiStd-Regular.otf/AdobeKaitiStd-Regular.otf).  Any suggestion on how to approach this task?

    Thank you very much.


Log in to post a comment.