[
https://issues.apache.org/jira/browse/PDFBOX-3667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15861480#comment-15861480
]
Maruan Sahyoun edited comment on PDFBOX-3667 at 2/10/17 4:27 PM:
-----------------------------------------------------------------
[~tilman]
To deal with the situation there are two possible options IMHO
a) to provide a handling similar to Adobe Acrobat add a {{getFields}} method at
the {{PDDocument}} level which will use the {{PDAcroForm}} field information if
available and if not use the {{PDAnnotation}} information.
b) build an {{AcroForm}} and {{Fields}} entry from the {{PDAnnotation}}
information
a) would allow to handle it like Adobe does. b) will fix the broken information
and add the necessary entries, but it will also change the model we have for
the PDF.
My preference here would be a).
Thinking a little more about it IMHO the best option would be to add a layer on
top of our current model and use a new tool, service, util what ever you'd like
to call it. {{InteractiveFormManager(PDDocument)}} which will sit on top and
handle forms related stuff. Will have the added benefit that we can implement
our default appearance when creating a new field. As this is implementation
specific and not part of the PDF spec we will keep that separate from the
specified stuff and don't clutter or add a lot of new stuff to the existing
classes.
WDYT?
was (Author: msahyoun):
[~tilman]
To deal with the situation there are two possible options IMHO
a) to provide a handling similar to Adobe Acrobat add a {{getFields}} method at
the {{PDDocument}} level which will use the {{PDAcroForm}} field information if
available and if not use the {{PDAnnotation}} information.
b) build an {{AcroForm}} and {{Fields}} entry from the {{PDAnnotation}}
information
a) would allow to handle it like Adobe does. b) will fix the broken information
and add the necessary entries, but it will also change the model we have for
the PDF.
My preference here would be a).
Thinking a little more about it IMHO the best option would be to add a layer on
top of our current model and use a new tool, service, util what ever you'd like
to call it. {{FormManager(PDDocument)}} which will sit on top and handle forms
related stuff. Will have the added benefit that we can implement our default
appearance when creating a new field. As this is implementation specific and
not part of the PDF spec we will keep that separate from the specified stuff
and don't clutter or add a lot of new stuff to the existing classes.
WDYT?
> Handle Widget Annotations as Fields even if there is no AcroForm Fields entry
> -----------------------------------------------------------------------------
>
> Key: PDFBOX-3667
> URL: https://issues.apache.org/jira/browse/PDFBOX-3667
> Project: PDFBox
> Issue Type: Improvement
> Components: AcroForm
> Affects Versions: 1.8.13, 2.0.4
> Reporter: Maruan Sahyoun
> Priority: Minor
>
> Some (mostly older) files have Widget Annotations but there is no
> AcroForms/Fields entry. PDFBox doesn't recognize these as form fields where
> Adobe Acrobat recognizes handles that. For a sample see PDFBOX-2003 and
> PDFBOX-3586.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]