[ 
https://issues.apache.org/jira/browse/PDFBOX-3723?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Richard Martin updated PDFBOX-3723:
-----------------------------------

Maruan,
I tested with pdfbox-2.1.0-20170320.180628-811.jar.  I hope that's what you
intended.

Good news, bad news.
Good news is that the fdf.values are no  onger enclosed in COSString().
Bad news is that I now get an error on pdfField.setValue(fdfValue) ;

Exception in thread "main" java.lang.NullPointerException
    at
org.apache.pdfbox.pdmodel.interactive.form.AppearanceGeneratorHelper.setAppearanceValue(AppearanceGeneratorHelper.java:137)
    at
org.apache.pdfbox.pdmodel.interactive.form.PDTextField.constructAppearances(PDTextField.java:263)
    at
org.apache.pdfbox.pdmodel.interactive.form.PDTerminalField.applyChange(PDTerminalField.java:226)
    at
org.apache.pdfbox.pdmodel.interactive.form.PDTextField.setValue(PDTextField.java:218)
    at
org.apache.pdfbox.ALS3122FormFillV2.importXFDF(ALS3122FormFillV2.java:321)
    at org.apache.pdfbox.ALS3122FormFillV2.main(ALS3122FormFillV2.java:110)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
In that, line 321 is the setValue line shown above.

I don't get that error with 2.0.4 or 2.0.5.  I can provide test case
material but it's a bit more involved than before because I should provide
a PDF file to post against.

I'll stick with 2.0.5 with my/our workaround for now.  My work is not yet
in production.
Thanks.
Dick

On Mon, Mar 20, 2017 at 2:22 PM, Maruan Sahyoun (JIRA) <[email protected]>



> FDFField.getValue() doesn't return the values in line with the Javadoc.
> -----------------------------------------------------------------------
>
>                 Key: PDFBOX-3723
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3723
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 2.0.0, 2.0.4, 2.0.5
>            Reporter: Maruan Sahyoun
>            Assignee: Maruan Sahyoun
>             Fix For: 2.0.6, 2.1.0
>
>
> For the 2.0.x releases {{FDFField.getValue()}} doesn't neither return the 
> documented {{PDTextStream}} return type nor {{String}} for values of type 
> {{COSString}} or {{COSStream}}. This has somewhat be masked by another issue 
> fixed in PDFBOX-3596. 
> As {{PDTextStream}} is no longer available we should return as {{String}} 
> (which is inline with {{PDField}}) and adjust the javadoc accordingly.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to