You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (Jira)" <ji...@apache.org> on 2024/11/24 10:24:00 UTC

[jira] [Comment Edited] (PDFBOX-5225) Flattening removes all annotations when widget annotation has no page

    [ https://issues.apache.org/jira/browse/PDFBOX-5225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17900665#comment-17900665 ] 

Tilman Hausherr edited comment on PDFBOX-5225 at 11/24/24 10:23 AM:
--------------------------------------------------------------------

A snapshot of 2.0.33 is now available:
https://repository.apache.org/content/groups/snapshots/org/apache/pdfbox/pdfbox-app/2.0.33-SNAPSHOT/

Also 3.0.4:
https://repository.apache.org/content/groups/snapshots/org/apache/pdfbox/pdfbox-app/3.0.4-SNAPSHOT/

please test it and tell whether it works as expected


was (Author: tilman):
A snapshot of 2.0.33 is now available:
https://repository.apache.org/content/groups/snapshots/org/apache/pdfbox/pdfbox-app/2.0.33-SNAPSHOT/

please test it and tell whether it works as expected

> Flattening removes all annotations when widget annotation has no page
> ---------------------------------------------------------------------
>
>                 Key: PDFBOX-5225
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5225
>             Project: PDFBox
>          Issue Type: Bug
>          Components: AcroForm
>    Affects Versions: 2.0.24, 2.0.32, 3.0.3 PDFBox
>            Reporter: Tilman Hausherr
>            Assignee: Tilman Hausherr
>            Priority: Major
>              Labels: flatten
>             Fix For: 2.0.33, 3.0.4 PDFBox, 4.0.0
>
>         Attachments: SourceFailure-saved.pdf, SourceFailure.pdf, screenshot-1.png
>
>
> {code}
>         PDAcroForm acroForm = doc.getDocumentCatalog().getAcroForm();
>         List<PDField> list = new ArrayList<>();
>         list.add(acroForm.getField("VN_NAME"));
>         acroForm.flatten(list, true); 
> {code}
> The code from buildPagesWidgetsMap that is run when there are widgets with missing page references does not consider the field list parameter. So all widgets end up in the map instead of only those we care about.
>  !screenshot-1.png! 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org