[
https://issues.apache.org/jira/browse/PDFBOX-3111?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16611228#comment-16611228
]
Keith Cozad edited comment on PDFBOX-3111 at 9/11/18 9:24 PM:
--------------------------------------------------------------
I appreciate your quick reply and apologize for the delay, I had to get a
generic form so we wouldn't have any legal trouble.
To show the concept, I simply used this form for the first and second document,
then merged them. I got the same result with the first page being filled out,
and the second appearing to lose the fields.
The fields are "creditCardAccountNumber", "creditCardExpirationMonth", and
"creditCardExpirationYear"
Here is my code:
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
PDFMergerUtility pdfMerger = new PDFMergerUtility();
pdfMerger.addSource( new File( "C:\\proof.pdf" ) );
pdfMerger.setDestinationStream(outputStream);
try
{ //The try block is for when we call off to get the second PDF, as it has a
small chance of failing pdfMerger.addSource( new File( "C:\\proof.pdf" ) ); }
catch(exception e)
{/*handle*/}
pdfMerger.mergeDocuments( MemoryUsageSetting.setupTempFileOnly() );
Here is my PDF: [^proof.pdf]
was (Author: strnger):
I appreciate your quick reply and apologize for the delay, I had to get a
generic form so we wouldn't have any legal trouble.
To show the concept, I simply used this form for the first and second document,
then merged them. I got the same result with the first page being filled out,
and the second appearing to lose the fields.
The fields are "creditCardAccountNumber", "creditCardExpirationMonth", and
"creditCardExpirationYear"
Here is my code:
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
PDFMergerUtility pdfMerger = new PDFMergerUtility();
pdfMerger.addSource( new File( "C:\\proof.pdf" ) );
pdfMerger.setDestinationStream(outputStream);
try
{ //The try block is for when we call off to get the second PDF, as it has a
small chance of failing pdfMerger.addSource( new File( "C:\\proof.pdf" ) ); }
catch(exception e){/*handle*/}
pdfMerger.mergeDocuments( MemoryUsageSetting.setupTempFileOnly() );
Here is my PDF: [^proof.pdf]
> Replicate Acrobat behavior when merging PDFs with interactive forms
> -------------------------------------------------------------------
>
> Key: PDFBOX-3111
> URL: https://issues.apache.org/jira/browse/PDFBOX-3111
> Project: PDFBox
> Issue Type: New Feature
> Components: AcroForm
> Affects Versions: 1.8.10, 2.0.0
> Reporter: Maruan Sahyoun
> Priority: Major
> Attachments: proof.pdf
>
>
> When PDFs containing interactive forms are merged using Acrobat, fields with
> the same name are merged into one. That's different to the current behavior
> of PDFBox which renames to be merged fields so they have a unique name (see
> PDFBOX-3094).
> In addition Acrobat supports merging documents with interactive forms into
> collections when keeping the existing (duplicate) fields is required.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]