• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to write Russian text to a document

Explorer ,
Jan 28, 2020 Jan 28, 2020

Copy link to clipboard

Copied

Hi,

I need to write Russian text in a pdf document. I found the tip how to do this on the forum. The author advises to see the example https://github.com/datalogics/adobe-pdf-library-samples/blob/master/CPlusPlus/Sample_Source/Text/Uni.... I downloaded this example to my computer, but I was not able to build it. The code contains references to some methods (for example, PDETextAddASText) which are not found in the standard Acrobat API. Tell me, please, how to build examples from the site above? Where can I download libraries and header files for assembly?
Thanks.

TOPICS
Acrobat SDK and JavaScript

Views

574

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 28, 2020 Jan 28, 2020

Copy link to clipboard

Copied

This method is part of the Acrobat plug-in API, and is available to plug-ins. HOWEVER, PDF libary is a separate product which must be licensed from Datalogics before you can use it. Expect a negotiation of fees and royalties.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 28, 2020 Jan 28, 2020

Copy link to clipboard

Copied

I was in error. https://dev.datalogics.com/adobe-pdf-library/adobe-pdf-library-c-language-interface/additional-apis-... says that PDETextAddASText is a new method created by DataLogics and only available with their library. Adding Unicode (non Latin1) text without it is much more complicated.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 28, 2020 Jan 28, 2020

Copy link to clipboard

Copied

Do you have examples or links on how to add text without using the PDETextAddASText method?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 28, 2020 Jan 28, 2020

Copy link to clipboard

Copied

Sadly, no. I found this to be a complex and difficult task requiring detailed knowledge of fonts both in PDF and on the OS platform. A commercial project, I cannot share anything from it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 29, 2020 Jan 29, 2020

Copy link to clipboard

Copied

In the Adobe API, there is a PDETextItemReplaceText method, one of the parameters of which is a link to the replaced text. I tried using this method to replace the text. Set this parameter to (Uns8 *) "111", but in the document this text was displayed incorrectly. What have I done wrong? Maybe you need to somehow convert this text before passing it to a method, as a parameter? Unfortunately, I did not find any examples of working with this method.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 29, 2020 Jan 29, 2020

Copy link to clipboard

Copied

In every case the string you pass must be in an encoding that matches the encoding for the font object. This is the source of most of the complication in adding or replacing text.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 29, 2020 Jan 29, 2020

Copy link to clipboard

Copied

I can get the current font for the replaced object:
PDEFont pdeFontCur = PDETextGetFont (pdeTextCur, kPDETextRun, 0);
But how to encode the replacement text in an encoding that matches the encoding for the font object?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 29, 2020 Jan 29, 2020

Copy link to clipboard

Copied

Can you show some example of working with this method?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 29, 2020 Jan 29, 2020

Copy link to clipboard

Copied

LATEST

Sorry, no I cannot show any example code. As I have said, this needs deep study.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines