We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Adobe Image Field Information Lost During Merge

AsposePDF: 9.3.0 (also tried 9.5.2)

I am experiencing an issue when merging / concatenating PDF documents (In this case I have a Static PDF version 1.7 (Acrobat 9.x) )that contain Adobe ImageFields. When viewing the resulting PDF using the below process, all ImageField information is lost. None of the fields that had images set in the origin documents are set in the result. The image fields (black bars on the left margin area) in this case are used to construct a makeshift bar code on the fly programmatically at run time.

com.aspose.pdf.Document pdfDocument1 = new com.aspose.pdf.Document(myDir + “imageFieldExampleStatic1.pdf”);
com.aspose.pdf.Form pdfFormDocument1 = pdfDocument1.getForm();
if(pdfFormDocument1 != null && pdfFormDocument1.getType() == com.aspose.pdf.FormType.Dynamic){
com.aspose.pdf.Document pdfDocument2 = new com.aspose.pdf.Document(myDir + “imageFieldExampleStatic2.pdf”);
com.aspose.pdf.Form pdfFormDocument2 = pdfDocument1.getForm();
if(pdfFormDocument2 != null && pdfFormDocument2.getType() == com.aspose.pdf.FormType.Dynamic){

com.aspose.pdf.Document pdfDocumentConcat = new com.aspose.pdf.Document();
com.aspose.pdf.PdfSaveOptions pdfSaveOptions = new com.aspose.pdf.PdfSaveOptions();
pdfDocumentConcat.save(myDir + “Concat.pdf”, pdfSaveOptions);

Concat.pdf is not completed as expected, as none of the ImageFields are set to use the black bar as appears in the original document. Also of note, I tried even creating a more recent Dynamic Adobe form (also Acrobat 9.x)to try this same process. Since I am currently forced to set the forms to Static (per this thread: Convert XFA to AcroForm and Merge PDF files using Java with Aspose.PDF) to maintain populated field information during the merge, this setting of the form to static results in internal null pointer exceptions being thrown from your toolkit whenever something contains populated image fields.

Is there a work around for this issue? Thanks in advance.

Hi Brian,

Thanks for your inquiry. While testing the scenario with your shared document, we have managed to reproduce the issue with latest version of Aspose.Pdf for Java 9.7.0. We have logged a ticket PDFNEWJAVA-34605 in our issue tracking system for further investigation and resolution. We will notify you as soon as it is resolved.

We are sorry for the inconvenience caused.

Best Regards,

Is there any update on this issue? Are you planning on fixing in the near future?

Hi Brian,

Thanks for your patience.

The development team has been busy resolving
other priority issues and I am afraid the issue reported earlier is not yet
resolved. Nevertheless, as soon as we have some definite updates regarding its
resolution, we would be more than happy to update you with the status of correction.
Please be patient and spare us little more time.<o:p></o:p>

We are really sorry for this inconvenience.