[ 
https://issues.apache.org/jira/browse/PDFBOX-2638?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

MANISHA SHARMA updated PDFBOX-2638:
-----------------------------------
    Attachment: MergedDoc.pdf
                Sample Pdf files.zip

Hereby, I am attaching a zip folder where you can find the pdf files that I 
used as sample files for merge in my code.

I also attached the output  merged Pdf  file   "MergedDoc.pdf"  where you can 
notice pdf pages whose content has been messed up (text got replaced by some 
boxes and images got lost).

> PDF files content lost when multiples pdf files merged in to one file
> ---------------------------------------------------------------------
>
>                 Key: PDFBOX-2638
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2638
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Rendering
>    Affects Versions: 1.8.2
>         Environment: Oracle Linux 5 (Intel 64-bit, Developer) 
>            Reporter: MANISHA SHARMA
>         Attachments: MergedDoc.pdf, Sample Pdf files.zip
>
>
> I am trying to merge six pdf files. In the merged document, I am seeing
> some boxes in place of text.
> Text got replaced by boxes and images got lost.
> The code used for merging is given below:
> public static void main (String args[])
>   {
>          String[] docletNamesAsPdf =
>          { "RP_OverviewPart1.pdf", "RP_OverviewPart2.pdf",
> "RP_OverviewPart3.pdf", "RP_OverviewPart4.pdf", "RP_OverviewPart5.pdf",
>            "RP_OverviewPart6.pdf" };
>          PDDocument dest = PDDocument.load(docletNamesAsPdf[0]);
>          PDDocument src = PDDocument.load(docletNamesAsPdf[1]);
>          dest = mergePdfs(dest, src);
>          for (int i = 2; i < docletNamesAsPdf.length; i++)
>           {
>              src = PDDocument.load(docletNamesAsPdf[i]);
>              dest = pptToPdf.mergePdfs(dest, src);
>           }
>          try {
>              dest.save("MergedDoc.pdf");
>          } catch (COSVisitorException e) {
>              ;
>          }
>          src.close();
>          dest.close();
> }
> public PDDocument mergePdfs(PDDocument dest, PDDocument src) throws
> IOException {
>          new PDFMergerUtility().appendDocument(dest, src);
>          return dest;
>      }
> Please let me know what is wrong with the code and how can we resolve
> this issue. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to