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

Junk Character Display for Some Greek Characters in Acrobat DC

Community Beginner ,
May 20, 2018 May 20, 2018

Copy link to clipboard

Copied

Hi,

I want to display Greek characters in the pdf Doc using c++, but after Stamping it shows Junk Character...

I am using PDEText Object to Add text to the pdf doc.

Please anyone Help me..

Thanks...

[Here is the list of all Adobe forums... https://forums.adobe.com/welcome]

[Encore is to create a DVD... moved to Acrobat programming forum... Mod]

TOPICS
Acrobat SDK and JavaScript

Views

3.3K

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

correct answers 1 Correct answer

Adobe Employee , May 24, 2018 May 24, 2018

Here is some sample code for writing Unicode values into a PDF. It shows five different languages.

https://github.com/datalogics/adobe-pdf-library-samples/blob/master/CPlusPlus/Sample_Source/Text/UnicodeText/UnicodeText.cpp

Votes

Translate

Translate
LEGEND ,
May 21, 2018 May 21, 2018

Copy link to clipboard

Copied

That suggests that the PDEFont you are using does not match the encoding of the text. What steps have you taken to make sure the font encoding includes Greek?

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
Community Beginner ,
May 21, 2018 May 21, 2018

Copy link to clipboard

Copied

I have not done any Encoding,,Just create PDEFont and Added text to the PDEText Object and Place it into the PDF Doc...

I dont know how to Encode Diffrent Language Characters....

I have used the following Code to create pdeFont.

pdeFont = PDEFontCreate(&pdeFontAttrs, sizeof(pdeFontAttrs), 0, 255, 0, /* Widths*/ 0, ASAtomNull,/* Encoding*/ 0, 0, 0, 0);/* Font embedding */

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 ,
May 22, 2018 May 22, 2018

Copy link to clipboard

Copied

Have you picked a font that contains Greek characters and embedded it?  Going from Latin1 characters ro other encodings is a very big leap in complexity. please look into the fonts — encodings chapter of the PDF specification for concepts needed.

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
Community Beginner ,
May 22, 2018 May 22, 2018

Copy link to clipboard

Copied

Thank you so much...for your Reply...

I try to Understand Font Encoding....

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
Community Beginner ,
May 22, 2018 May 22, 2018

Copy link to clipboard

Copied

I have tried to Encode PDEFont using the following code...

PDSysFont sysFont = PDFindSysFont(&pdeFontAttrs, sizeof(pdeFontAttrs), 0);

PDSysEncoding sysEncoding = PDSysEncodingCreateFromCMapName(ASAtomFromString("UniJIS-UTF16-H"));  //encoding  used is "UniJIS-UTF16-H"

pdeFont = PDEFontCreateFromSysFontAndEncoding(sysFont, sysEncoding, pdeFontAttrs.name, kPDEFontCreateEmbedded | kPDEFontCreateSubset | kPDEFontEncodeByGID | kPDEFontDeferWidths | kPDEFontCreateToUnicode);

pdeFont = PDEFontCreateFromSysFont(sysFont, kPDEFontCreateEmbedded);

pdeFont = PDEFontCreate(&pdeFontAttrs, sizeof(pdeFontAttrs), 0, 255, 0, /* Widths*/ 0, ASAtomNull,/* Encoding*/ 0, 0, 0, 0);

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
Adobe Employee ,
May 22, 2018 May 22, 2018

Copy link to clipboard

Copied

Why would you choose a Japanese encoding (UniJIS)? And even if that was the one you wanted, you don’t bother passing it to PDEFontCreate()…

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
Community Beginner ,
May 22, 2018 May 22, 2018

Copy link to clipboard

Copied

Please Suggest me...How i need to go for Encode Greek Characters...and Displayed those in the PDF Doc...

Thanks

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
Adobe Employee ,
May 22, 2018 May 22, 2018

Copy link to clipboard

Copied

There is a sample in the SDK that shows how to draw Unicode text in a PDF. Have you looked at that sample?

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
Community Beginner ,
May 22, 2018 May 22, 2018

Copy link to clipboard

Copied

I was new in C++....

No...I am Looking for SDK Samples..

Please Send me Some code about how to add encoded text into pdf Doc...This was more helpful to me..

Thank You..

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 ,
May 22, 2018 May 22, 2018

Copy link to clipboard

Copied

The encoding will be custom, not one of the few built in names. Do NOT expect to be able to use Unicode ! So, what encoding (character set) are you using for your Greek characters. If you don't know the exact hex values in your string, now is the time to find out.

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
Community Beginner ,
May 22, 2018 May 22, 2018

Copy link to clipboard

Copied

I want to Display the Character Set "Acuta 12358µ Regulatory Informative System" text into PDF Doc.

But when I stamp the Text into PDF Doc...it Looks like

here...When I debugging, CString Shows Exact String what I Given Input..

but When I add Text into PDEText Object it shows Different Character means "Acuta 12358ae Regulatory System....."

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 ,
May 22, 2018 May 22, 2018

Copy link to clipboard

Copied

Please answer my question exactly. We cannot tell anything about the encoding from copy/paste text. Please don't tell us that it shows right on screen, that is not the answer without knowing the platform app and system locale. If you don't know the encoding what is the exact hex value of the "mu"?

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
Community Beginner ,
May 23, 2018 May 23, 2018

Copy link to clipboard

Copied

I have used the following code for the Font Encoding

const std::string strFontName = FontName;

pdeFontAttrs.name = ASAtomFromString(strFontName.c_str()); /* font name */

pdeFontAttrs.type = ASAtomFromString("Type1");       /* font type */

pdeFont = PDEFontCreate(&pdeFontAttrs, sizeof(pdeFontAttrs), 0, 255, 0, /* Widths*/ 0, ASAtomNull,/* Encoding*/ 0, 0, 0, 0);/* Font embedding */

PDSysEncoding sysEncoding = PDSysEncodingCreateFromCMapName(ASAtomFromString("Identity-H"));

PDEFontCreateFlags fontCreateFlags = (PDEFontCreateFlags)(kPDEFontCreateToUnicode | kPDEFontCreateEmbedded | kPDEFontWillSubset);

PDSysFont sysFont = PDFindSysFont(&pdeFontAttrs, sizeof(pdeFontAttrs), 0);

pdeFont = PDEFontCreateFromSysFontAndEncoding(sysFont, sysEncoding, pdeFontAttrs.name, fontCreateFlags);

pdeFont = PDEFontCreateFromSysFont(sysFont, kPDEFontCreateEmbedded);

After Doing this...Junk character not Displayed but instead of Original Character it shows Different Formats.

I don't know Where i am Wrong.

Thanks in Advance.

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 ,
May 23, 2018 May 23, 2018

Copy link to clipboard

Copied

You never answered my questions about what encoding you have the text in. You can’t do anything unless you know that, so why not work in answering 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
Community Beginner ,
May 23, 2018 May 23, 2018

Copy link to clipboard

Copied

Ansi Encoding...

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
Community Beginner ,
May 23, 2018 May 23, 2018

Copy link to clipboard

Copied

Please tel me the Steps to Display Exact same character in the PDF Doc...

Thanks...

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 ,
May 23, 2018 May 23, 2018

Copy link to clipboard

Copied

No it is not ANSI because there is no mu in ANSI. You have to know this. What hex code is 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
Community Beginner ,
May 23, 2018 May 23, 2018

Copy link to clipboard

Copied

The Hexa value for Mu is;&‌#x03BC

Which Encoding I need to Do...

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 ,
May 23, 2018 May 23, 2018

Copy link to clipboard

Copied

Not the HTML code. Please examine YOUR DATA to see what hex code is used. This is about YOUR data, not a magic recipe that will solve this for everyone.

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
Community Beginner ,
May 23, 2018 May 23, 2018

Copy link to clipboard

Copied

I just convrted my string to Hexadecimal Value.

For "Mu" I get an Hexadecimal value as "B5".

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
Adobe Employee ,
May 24, 2018 May 24, 2018

Copy link to clipboard

Copied

Here is some sample code for writing Unicode values into a PDF. It shows five different languages.

https://github.com/datalogics/adobe-pdf-library-samples/blob/master/CPlusPlus/Sample_Source/Text/UnicodeText/UnicodeText.cpp

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
Community Beginner ,
May 24, 2018 May 24, 2018

Copy link to clipboard

Copied

LATEST

Thank a Lot...for All replies...

it was working....

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