admin管理员组文章数量:1648974
I have an issue related to wrapping of text in pdf format. For all the formats like xls,rtf, and pptx the report works fine,however in pdf some text gets wrapped i.e. some letters of the text especially the last few letters gets printed in the next line. I have tried almost all the options in the properties for that text. The only way I could reduce the effect was by changing the pdf font name to times roman for those text. However even this does not work in some case.
The snippet contains problem TextField:
I would be very grateful if you share some solution for this.
Thanks...
P.s I get this issue when i generate the report from Ireport 4.0.2
解决方案
First, use Font Extensions. Your issue is very likely because JasperReports (iText) isn't using the font that you want it to be using when generating the PDF. Font Extensions solve this.
Second, it's possible that you're encountering an issue that got fixed. The JasperReports 4.1.1 Change Log includes this:
the net.sf.jasperreports.export.pdf.force.linebreak.policy configuration property is now deprecated as the PDF text rendering code was refactored so that text is rendered exactly like in AWT
版权声明:本文标题:JAVA生成PDF标点符号不换行,生成的pdf文件中的文本换行问题 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/dongtai/1729504082a1203419.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论