我在表单中使用波兰语字符.不幸的是,在自动模式下生成 PDF 文件期间,不会打印所有波兰语变音字符(即:文本 'zażółć gęślą jaźń' 被打印为 'zaó gl ja').我试图在文件 properties-local.xml 中设置属性:
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"/>或使用通配符:
<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"/>我用不同的字体测试了 PDF 生成,但没有奏效.我什至没有注意到 PDF 中字体样式的变化.那么问题来了,应该怎么做才能正确打印PDF中的波兰语字符?
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?
推荐答案这些属性适用于模板模式,它们不适用于自动模式.试试:
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"/>另见 doc.