Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

With some EMF files a question mark appears instead of a special character. Is that a bug in DynaPDF?

0
Posted

With some EMF files a question mark appears instead of a special character. Is that a bug in DynaPDF?

0

No. Strings are always stored in Unicode format inside of EMF files, even if they only contain ANSI characters. DynaPDF uses the character set, which was used in the ExtCreateFont() record, to determine whether the string can be printed in ANSI or Unicode format. The character set is often wrongly set, e.g. Unicode is required but ANSI_CHARSET is set, that is why a question mark appears then instead of the special character. Conversion of strings to ANSI can be disabled with the flag mfUseUnicode (see SetMetaConvFlags() in the help file), this enables printing of special characters even if a incorrect character set was used. However, it is better to set character set correctly instead of printing all strings in Unicode format, because the ANSI format is more compact. BTW – GDI uses the character set for font selection only, it is not used to display characters on screen.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123