[
https://issues.apache.org/jira/browse/PDFBOX-6179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18067151#comment-18067151
]
Tilman Hausherr edited comment on PDFBOX-6179 at 3/20/26 8:25 PM:
------------------------------------------------------------------
It's more complex, the method you are using returns the top level only. The
fields are a tree structure; to understand how, look at your file with
PDFDebugger. Make sure to switch the view to "internal structure".
was (Author: tilman):
It's more complex, the method you are using returns the top level only.
> Removing fields not possible
> ----------------------------
>
> Key: PDFBOX-6179
> URL: https://issues.apache.org/jira/browse/PDFBOX-6179
> Project: PDFBox
> Issue Type: Bug
> Components: AcroForm
> Affects Versions: 3.0.7 PDFBox
> Reporter: Stefan Ziegler
> Priority: Major
>
> Seems that fields can no longer be removed like this:
> PDField field = acroForm.getField("XXXXX");
> List<PDField> fields = acroForm.getFields();
> fields.remove(field);
> Internally, the field is never found. PDField has no equals method. getField
> and getFields create new PDField instances and so equals fails in this case.
> Shouldn't there be an equals method in PDField, that compares the underlying
> COSObject?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]