[
https://issues.apache.org/jira/browse/PDFBOX-3479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15456237#comment-15456237
]
Maruan Sahyoun edited comment on PDFBOX-3479 at 9/1/16 6:25 PM:
----------------------------------------------------------------
When trying to set the value in Acrobat using JavaScript the there is an error
in the console
{code}
RaiseError: Invalid annotation object.
Doc.getField:2:Batch undefined:Exec
===> Invalid annotation object.
{code}
and there are neither an AP entry nor a V entry. What about doing the same here
if there is only one such widget. In cases where there are multiple widgets
where only one is invalid I'd set the V entry but don't generate an AP for the
incorrect widget.
was (Author: msahyoun):
When trying to set the value in Acrobat using JavaScript the there is an error
in the console
{code}
RaiseError: Invalid annotation object.
Doc.getField:2:Batch undefined:Exec
===> Invalid annotation object.
{code}
and there are neither an AP entry nor a V entry. What about doing the same here?
> NPE in AppearanceGeneratorHelper.setAppearanceValue() if no rectangle in
> widget
> -------------------------------------------------------------------------------
>
> Key: PDFBOX-3479
> URL: https://issues.apache.org/jira/browse/PDFBOX-3479
> Project: PDFBox
> Issue Type: Bug
> Components: AcroForm
> Affects Versions: 2.0.2, 2.0.3, 2.1.0
> Reporter: Tilman Hausherr
> Assignee: Tilman Hausherr
> Fix For: 2.0.3, 2.1.0
>
> Attachments: SimpleForm.pdf, SimpleForm2.pdf
>
>
> As reported in the linked stackoveflow question, can be reproduced with the
> CreateSimpleForm example by removing the {{widget.setRectangle(rect);}}.
> {code}
> 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:225)
> at
> org.apache.pdfbox.pdmodel.interactive.form.PDTextField.setValue(PDTextField.java:218)
> {code}
> I'll throw an IOException.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]