[
https://issues.apache.org/jira/browse/PDFBOX-4812?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17084698#comment-17084698
]
Michael Klink commented on PDFBOX-4812:
---------------------------------------
{quote}
We should use Adobe Acrobat Reader.
{quote}
Looking at the internal document structures, [^Rapport de poste 11042020 P2
orginal.pdf] does look like it may have been saved with Adobe Reader but
[^Rapport de poste 10042020 P1 original.pdf] looks entirely differently, not at
all like saved by a current Adobe Reader version. Or more to the point, that
latter file contains 5 revisions. The first 4 at first glance look like they
may be generated by Adobe products but the final one definitively is not. And
that last revision is the one with the utterly broken form field widget
appearance streams.
{quote}
Open the filled form with Adobe Acrobat Reader works fine.
{quote}
Are you sure? Here Adobe Acrobat Reader does not complain explicitly but it
displays an empty Détail field. Only after clicking into it, you see contents.
Thus, Adobe Reader also here cannot cope with the field appearance, it merely
ignores it.
{quote}
After flattening, some PDF files open with an error.
{quote}
Flattening made the broken appearance stream part of the page content (via an
XObject).
Adobe Reader seems to be more lax when encountering garbage in a form field
appearance than when encountering it in the page content.
{quote}
What to do now ?
{quote}
Return the broken PDFs (like [^Rapport de poste 10042020 P1 original.pdf]) to
the team in question and ask them to fill it in correctly.
> flatten can corrput PDF file
> ----------------------------
>
> Key: PDFBOX-4812
> URL: https://issues.apache.org/jira/browse/PDFBOX-4812
> Project: PDFBox
> Issue Type: Bug
> Components: AcroForm
> Affects Versions: 2.0.19
> Environment: Windows 7, Eclipse Neon, Java 8
> Reporter: Jean-Pascal Laux
> Priority: Major
> Attachments: Rapport de poste 10042020 P1 flattened.pdf, Rapport de
> poste 10042020 P1 original.pdf, Rapport de poste 11042020 P2 orginal.pdf,
> image-2020-04-14-16-27-34-250.png, screenshot-1.png
>
>
> Hello,
> Depend of the content of the a text field, flatten create a PDF document
> without the value of the text value and Acorbat REader gives a error message
> when it opens the document.
> I have to rewrite the field value to have a correct PDF document.
> PDField field=form.getField("Détail page 1");
> if (field!=null) field.setValue(field.getValueAsString());
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]