How to add Custom Fonts in Case Digest PDF?

Divya D
Tera Contributor

Hi,

 

I have a requirement to add a custom font in Case Digest PDF. 

For this, I have loaded a TTF file in 'sys_pdf_generation_font_family' table. Later, I added font family sys_id in OOB script include CSPDFUtilImpl like below. I have added same font in template too. But it is not working as expected in pdf..It is taking OOB font only. Can anyone help me out.

DivyaD_0-1686724385356.png

 

 

Thanks 

D

 

2 REPLIES 2

Hayo Lubbers
Kilo Sage

Hi @Divya D ,

 

Can you call the script from a background script? It gives some feedback as response that might help.

 

Example if you have the familyFont Family, but the TTF is not properly attached (or multiple files), you might get something like:

HayoLubbers_0-1686746002528.png

Or check the sys_pdf_generation_status table, it might contain some information you need.

 

When generating the HTML, do you have the font with that exact name also mentioned in your style?

Example with Verdana:

HayoLubbers_1-1686746169207.png

 

If I remember correctly, the name here needs to match exactly with the name in the Font Families.

 

Daniel Oderbolz
Kilo Sage

@Divya D 

Check out this excellent article by Callum Ridley: Generating Custom PDFs - using the new PDFGenerationAPI

He explains it in some detail.

Cheers

Daniel


If this answer was helpful, I would appreciate if you marked it as such - thanks!

Best
Daniel