Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Unable to use Garamond font family in PDF using pd4ml

SA-70110

Summary



When using a custom activity to invoke pd4ml and generate PDFs, Garamond font is replaced with the Calibri font.

The activity has a Java step using the following code.


    pd4ml.useTTF("<SERVER_PATH>", true ); 
    pd4ml.setDefaultTTFs("Garamond", "Garamond", "Garamond");

The HTML stream contains the following reference.

 <pd4ml:usettf from="<SERVER_PATH>" serif="Garamond" sansserif="Garamond" monospace="Garamond">


Error Messages


 

Not Applicable


Steps to Reproduce


 
  1. Upload Garamond TTF files to the server path.
  2. Create an activity to call pd4ml to generate PDFs.
  3. Write a custom Java step to access the font file, using the code above.

        pd4ml.useTTF("<SERVER_PATH>", true ); 

        pd4ml.setDefaultTTFs("Garamond", "Garamond", "Garamond");
     
  4. Include the above HTML code  in the HTML stream.
     

     <pd4ml:usettf from="<SERVER_PATH>" serif="Garamond" sansserif="Garamond" monospace="Garamond">


Root Cause



An issue in the custom application code or rules.
The custom activity invoked the pd4ml APIs incorrectly.



Resolution



Perform the following local-change: Mention the pyPDFPropsDirectory parameter along with pyPDFFontsDirectory when calling the HTMLToPDF activity instead of implementing a custom call.

Published January 19, 2019 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us