Hello. I'm trying to merge two pdf files. The files are dynamic forms that have
been generated for me. I just need to merge them into one pdf file to print.
The files merge ok but some of the data is missing from them after the merge.
Here's the code I'm using.
PDFMergerUtility pdfMergerUtil = new PDFMergerUtility();
PDDocument outputDocument = new PDDocument();
PDDocument pdfReader = null;
pdfReader = PDDocument.load("a ByteArrayInputStream with the
byte array of the first pdf document");
pdfMergerUtil.appendDocument(outputDocument, pdfReader);
pdfReader = PDDocument.load("a ByteArrayInputStream with the
byte array of the second pdf document");
pdfMergerUtil.appendDocument(outputDocument, pdfReader);
outputDocument.save(outputStream);
outputDocument.close();
Is this a known problem? Are there any workarounds or solutions to this? Thanks,
Brian