PDF Generating Tool Support Forum

HOME   Login   Register    Search




  Subject: Rendering Special Characters in PDF
   PostPosted: 30 Sep 2020, 17:35 
Hello,

We are using pro edition of pd4ml, version is 3105. We are using the lib to convert xhtml files to pdf files. But some special characters aren't getting converted properly in the output pdf. Characters like: ≤ or ↑ . I have tried changing characters encoding with pd4ml.overrideDocumentEncoding(), but it did not fix the issue.

Any suggestions?
Thanks


  Subject: Re: Rendering Special Characters in PDF
   PostPosted: 30 Sep 2020, 17:45 
By default PD4ML converts only characters, belong to ISO-8859-1 charset, referring PDF-viewers builtin fonts. The problematic chars obviously do not belong to the charset.

In order to resolve the issue you need to configure and to utilize TTF embedding feature of PD4ML.


  Subject: Re: Rendering Special Characters in PDF
   PostPosted: 30 Sep 2020, 17:54 
Are you referring to pd4ml.useTTF() ? But we are not using any .ttf files in our project. How can we load ttf when aren't using any?


  Subject: Re: Rendering Special Characters in PDF
   PostPosted: 30 Sep 2020, 18:01 
You need either to include ttf/otf fonts to your project, or to refer the system fonts if system font location in the target environment is predictable.

You need to generate pd4font.properties font mapping file (and include it to your project) and from the file you can refer system or project font folder.

Pass the pd4font.properties location to useTTF() as a parameter.



[Reply]     [ 4 posts ] 

cron
Copyright ©2004-10 zefer|org. All rights reserved. Bookmark and Share