问题
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