pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maruan Sahyoun <sahy...@fileaffairs.de>
Subject Re: How to merge forms where there is
Date Fri, 11 Sep 2015 08:14:33 GMT
Hi Kevin
> Am 11.09.2015 um 00:41 schrieb Kevin Ternes <KTernes@thegeneral.com>:
> 
> I am trying merge PDDocuments using the PDMergerUtility.appendDocument() method to merge
many PDDocuments into a single PDDocument.  Like:
>    PDFMergerUtility mergerUtility = new PDFMergerUtility();
>    mergerUtility.appendDocument(destination, source);
> 
> If I have destination and source PDDocuments each with a form where some of the form
fields have the same names, then I end up with only fields of the original destination displaying
the values in the fields.  

that's a current limitation that when merging forms only the forms root fields are renamed
if the field already exists but not any kids. It would be helpful if you could open an issue
in JIRA https://issues.apache.org/jira/browse/PDFBOX/ <https://issues.apache.org/jira/browse/PDFBOX/>
and attach two sample documents with 'conflicting' field names.

> 
> Is there some way to merge PDDocuments which will allow the merged in sources to still
display field values?
> None of these field values will need to be changed afterward the merge.  They are set
to read-only.
> 
> I tried flattening the source fields but most of these documents rely on field annotation
for the field value formatting and this is not to be changed.

when a field is flattened correctly the formatting of the annotations visually representing
the field become part of the page content stream. So if you don't need the fields at all -
as there is no further input - you could flatten the source documents prior to merging them.

BR
Maruan

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


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message