[
https://issues.apache.org/jira/browse/PDFBOX-3218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15125393#comment-15125393
]
ASF GitHub Bot commented on PDFBOX-3218:
----------------------------------------
GitHub user rsby opened a pull request:
https://github.com/apache/pdfbox/pull/21
PDFBOX-3218 and PDFBOX-3111 Alter Field Merge Handling
Optimizing field merging, altering to prevent multiple inclusions of same
field, adding ability to set name for new fields and to turn off field renaming
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/rsby/pdfbox trunk
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/pdfbox/pull/21.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #21
----
commit 57d9a31faa256e9680b82fff553f054d1264b5aa
Author: rees <[email protected]>
Date: 2016-01-27T22:38:34Z
Alter ArcoForm merging to add only root fields
commit 300af4a5ec68e2592d80cb04d2ec85c7972f1027
Author: rees <[email protected]>
Date: 2016-01-28T11:01:30Z
PDFBOX-3218 add unit test asserting each field merged only once
commit 7337cfaa9908bcb25c2b45504f4bf744c75ec41c
Author: rees <[email protected]>
Date: 2016-01-30T01:29:46Z
PDFBOX-3218 adding back collision detection for case where we may be
merging previously merged forms
commit 8320af4769d50edd316b6b63d46967b9f0801e25
Author: rees <[email protected]>
Date: 2016-01-31T15:50:04Z
PDFBOX-3218
PDFBOX-3111
Adding optimization on nextFieldNum to reduce number of collisions, checks,
and redundancy
----
> PDFMergerUtility improperly merges AcroForms, causing some forms to break
> -------------------------------------------------------------------------
>
> Key: PDFBOX-3218
> URL: https://issues.apache.org/jira/browse/PDFBOX-3218
> Project: PDFBox
> Issue Type: Bug
> Components: Utilities
> Affects Versions: 2.0.0
> Reporter: Rees Byars
>
> In PDFMergerUtility.mergeAcroForm, adding a parent field to the destination
> fields automatically adds the children, but the code does not account for
> this. The result is that the same fields get added many times with different
> names. This is a silent error for most PDFs. However, for some forms, the
> resultant PDFs cause SOM expression errors in Adobe Reader.
> This problem can be reproduced by appending the following PDFs in the order
> listed:
> http://www.vba.va.gov/pubs/forms/VBA-21-4185-ARE.pdf
> http://www.vba.va.gov/pubs/forms/VBA-21-534EZ-ARE.pdf
> We were able to fix this issue for our purposes by forking the github mirror
> and altering the mergeAcroForm method to only append fields whose parent is
> null.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]