Question
Capgemini
IN
Last activity: 21 May 2018 12:02 EDT
Custom fonts are not coming in generated PDF with pega provided procedure
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
US
As a diagnostic put the font in a folder on your C drive where the JVM is. And hard code a fully qualified path to it like this.
"C:\\SpecialFonts"
Does it work in this case? If so, now you know a working example syntax. Try and find where you put the font on the server for this param to look for.
Capgemini
IN
This is not working. I've tried with this.
Pegasystems Inc.
IN
Please go through below article hope it helps
https://community.pega.com/support/support-articles/inline-font-does-not-reflect-when-generating-pdf
Thanks,
Arun
Capgemini
IN
This is not helping me. Is there any way where I can set the directory of webwb as a parameter for HTMLtoPDF activity
Capgemini
IN
in my HTML Rule, when I am giving Font source URL as "webwb/<Fontname.extension>" within style tag and going to preview it's giving me perfect result without this issue. Now I'm giving it as url('C:\\PRPCPersonalEdition\jre1.8.0_121\Fonts\<fontname.extension>') and going to preview it's again throwing the issue. (Note: I've put all the files this directory also). So I guess the issue is with Directory.
So if there is any possibility to pass "webwb" directory value as a parameter in HTMLtoPDF activity this issue will be fixed.
Capgemini
IN
anyone can help me with pyPDFFontsDirectory value
Swedbank AB
SE
Hi Dibyakanti,
Try below options
Option1:-
1. Create section place your fields/grids and apply styles from skin.
2. Include the section in stream rule and pass the stream rule to HTMLtoPDF activity.
Option2:-
Set the parameter in stream rule as below.
tools.putParamValue("pyPDFFontsDirectory ", "complete path of webwb");
Option3:-
you can set the pyPDFFontsDirectory parameter in your calling activity of HTMLtoPDF.
Note:- Make sure your giving complete path file
Thanks,
Deva
Capgemini
IN
Hi All,
Couple of things, previously I've used font-family in HTML tag to embed my font. Pega uses pd4ml library for pdf generation purpose where we need to pass font face in HTML tag based on my ttf file rather than using font-family. Source : http://pd4ml.com/cookbook/pd4ml_pdf_true_type_fonts.htm
So now somehow this issue got 90% resolved. But getting new issue.
Now current issue :
For Debuging purpose I have passed Param.pyPDFPropsDirectory value where properties file is getting generated. In my properties file I am getting font.dir.location=C\:\\\\PRPCPersonalEdition\\\\jre1.8.0_121\\\\lib\\\\fonts, But I've set this value this value as C:\\PRPCPersonalEdition\\jre1.8.0_121\\lib\\fonts (pyPDFFontsDirectory parameter value). For this my correct font is not getting picked up.
Any body has any idea why this value is coming like this?
Also I've tried giving this value like C:\PRPCPersonalEdition\jre1.8.0_121\lib\fonts and C:/PRPCPersonalEdition/jre1.8.0_121/lib/fonts