问题
I'm using Polish characters in forms. Unfortunately, during the generation of the PDF file in automatic mode, all Polish diacritical characters are not printed (ie: text 'zażółć gęślą jaźń' is printed as 'zaó gl ja'). I tried to set properties in file properties-local.xml:
<property as="xs:string" name="oxf.fr.pdf.template.font.path.vera" value="path_to_font/font.ttf"/>
<property as="xs:string" name="oxf.fr.pdf.font.family.vera" value="Arial"/>
or with wildcards:
<property as="xs:string" name="oxf.fr.pdf.template.font.path.*" value="path_to_font/font.ttf"/>
<property as="xs:string" name="oxf.fr.pdf.font.family.*" value="Arial"/>
I tested PDF generation with different fonts, but it didn't work. I didn't even notice font style changes in PDF. So there is a question, what should be done to properly print the Polish characters in the PDF?
回答1:
These properties are for the template mode, and they won't work for the automatic mode. Try instead:
<property
as="xs:string"
name="oxf.fr.pdf.font.path.vera"
value="path_to_font/font.ttf"/>
<property
as="xs:string"
name="oxf.fr.pdf.font.family.vera"
value="Arial"/>
See also the doc.
来源:https://stackoverflow.com/questions/20281441/orbeon-change-font-to-get-polish-letters