JAVA生成PDF标点符号不换行,生成的pdf文件中的文本换行问题

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值