You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Maruan Sahyoun (JIRA)" <ji...@apache.org> on 2017/05/05 18:32:05 UTC
[jira] [Comment Edited] (PDFBOX-3732) IllegalArgumentException when
refreshing an appearance and no font resources are defined
[ https://issues.apache.org/jira/browse/PDFBOX-3732?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15998734#comment-15998734 ]
Maruan Sahyoun edited comment on PDFBOX-3732 at 5/5/17 6:32 PM:
----------------------------------------------------------------
For the sample form created by the above code from [~tilman] Adobe Reader will add {{/Helv}} and {{/ZaDb}} resource entries to the PDF see [^PDFBOX3732-minimal-reader.pdf].
For the file [^out.pdf] again {{/Helv}} and {{/ZaDb}} are added. In addition the {{/F1}} entry from the appearance stream resources is taken and added to the AcroForm {{/DR}} entry.
So I suggest to not implement the patch as is but replicate Adobe Acrobats behavior.
was (Author: msahyoun):
For the sample form created by the above code from [~tilman] Adobe Reader will add {{/Helv}} and {{ZaDb}} resource entries to the PDF see [^PDFBOX3732-minimal-reader.pdf]].
For the file [^out.pdf] again {{/Helv}} and {{ZaDb}} are added. In addition the {{/F1}} entry from the appearance stream resources is taken and added to the AcroForm {{/DR}} entry.
So I suggest to not implement the patch as is but replicate Adobe Acrobats behavior.
> IllegalArgumentException when refreshing an appearance and no font resources are defined
> ----------------------------------------------------------------------------------------
>
> Key: PDFBOX-3732
> URL: https://issues.apache.org/jira/browse/PDFBOX-3732
> Project: PDFBox
> Issue Type: Bug
> Components: AcroForm
> Affects Versions: 2.0.5
> Reporter: simon steiner
> Fix For: 2.0.6, 3.0.0
>
> Attachments: out.pdf, out-reader.pdf, PDFBOX3732-minimal.pdf, PDFBOX3732-minimal-reader.pdf, refreshAppearances.patch
>
>
> PDDocument doc = PDDocument.load(new File("out.pdf"));
> doc.getDocumentCatalog().getAcroForm().setNeedAppearances(false);
> doc.getDocumentCatalog().getAcroForm().refreshAppearances();
> doc.save("pdfbox.pdf");
> doc.close();
> Exception in thread "main" java.lang.IllegalArgumentException: /DR is a required entry
> at org.apache.pdfbox.pdmodel.interactive.form.PDDefaultAppearanceString.<init>(PDDefaultAppearanceString.java:82)
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org