iText7 - PdfFormField.setValue() fails if the /DA uses a decimal font size

偶尔善良 提交于 2019-12-02 09:25:04

问题


iText 7.0.0

i have a PDF created by Adobe LiveCycle ES 10 that's producing a TextField with a

/DA /Arial-BoldMT 9.00 Tf 0.000 0.000 1.000 rg

this causes a failure in PdfFormField.regenerateField() which expects the text font size to be an Integer (i don't see any specific mention in the PDF spec that this would be true)

an acceptable workaround for my particular case appears to be just setting /V in the dictionary, but curiously why does setValue() work so hard?


回答1:


This is fixed in iText 7.0.1. Font sizes are now handled as decimal values and exposed in the entire API as floats



来源:https://stackoverflow.com/questions/38643972/itext7-pdfformfield-setvalue-fails-if-the-da-uses-a-decimal-font-size

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!