Fonts.WriteToUnicode

PDF-XChange Drivers API (only) V4/V5
This Forum is for the use of Software Developers requiring help and assistance for Tracker Software's PDF-XChange Printer Drivers SDK (only) - VERSION 4 & 5 - Please use the PDF-Tools SDK Forum for Library DLL assistance.

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan

Post Reply
alex59
User
Posts: 10
Joined: Wed Mar 15, 2023 10:12 am

Fonts.WriteToUnicode

Post by alex59 »

What exactly does the property Fonts.WriteToUnicode?

If I generate a pdf file without the property Fonts.WriteToUnicode = TRUE, the result seems to be the same as with this property. Even very strange characters like 🌝🥕 ᶄ ᶾ ẙ works without this property as well as with the property.

Best regards, Alex
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Fonts.WriteToUnicode

Post by Tracker Supp-Stefan »

Hello alex59,

You would probably not be able to copy and paste characters from both of your test files in the same way!

The "ToUnicode" table is not mandatory for a font to display correctly inside the PDF file, however when you want to copy that text and be able to paste it in a third party product (e.g. Notepad/WordPad) - the "ToUnicode table is needed for the 'translation' process. Otherwise you might end up with "squares" pasted in notepad instead of the expected symbols.

So I presume that the .WriteToUnicode forces the creation of the "ToUnicode" table needed for text copying and pasting.

Kind regards,
Stefan
alex59
User
Posts: 10
Joined: Wed Mar 15, 2023 10:12 am

Re: Fonts.WriteToUnicode

Post by alex59 »

Hello Stefan

I allready supposed, that there could be a copy&paste problem without the proerty Fonts.WriteToUnicode. But there is not such problem.

I´ll set the property, because it probably can´t hurt.

Best regards, Alex
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Fonts.WriteToUnicode

Post by Tracker Supp-Stefan »

Hello alex59,

I did some more reading - and it seems like with .WriteToUnicode set - the fonts are encoded using unicode character map set and not e.g. a narrower ones like say Windows-1251-1252 etc.

Kind regards,
Stefan
Post Reply