Hi, that's a bug in PDFBox which also exists in PDFBox 2.0.x for 2.0.4 and earlier but was masked by another issue. I've opened PDFBOX-3723 for that. Please comment if you don't think the description matches your issue. It would also be good to have some sample files and a unit test with the expected results.
BR Maruan > Am 18.03.2017 um 17:19 schrieb Dick Martin <[email protected]>: > > I'm using PDFBox to fill form fields with data from XFDF files using PDFBox > to convert XFDF to FDF. > With 2.0.4, values are filled as expected. > > When trying 2.0.5, I find that fdf field values are "enclosed" like this: > COSString{Tester, Richard (Dick)} > > Using the same code with 2.0.4, that same value is returned as expected > like this: > Tester, Richard (Dick) > > Is there something I should be doing differently in 2.0.5 to accommodate > the COSString "wrapper"? Or is it a 2.0.5 issue? > > Here is a code snippet showing how my code iterates through the FDF fields > and gets the field values. I know this may be out of context. I can > provide more detail if needed. > > List<?> fields = fdf.getCatalog().getFDF().getFields(); > if( fields != null ) > { > String defaultAppearanceString = "/Helv 0 Tf 0 g"; > for (Object field : fields) > { > FDFField fdfField = (FDFField) field; > String fdfName, fdfValue; > Integer fdfNameLen; > Integer fdfValueLen; > fdfName = fdfField.getPartialFieldName() ; > fdfValue = String.valueOf(fdfField.getValue()); > fdfNameLen = fdfName.length(); > fdfValueLen = fdfValue.length(); > > > Thanks. > Dick Martin --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

