[
https://issues.apache.org/jira/browse/PDFBOX-2638?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andreas Lehmkühler closed PDFBOX-2638.
--------------------------------------
Resolution: Not a Problem
Assignee: Andreas Lehmkühler
Please use our [mailinglists|http://pdfbox.apache.org/mailinglists.html] to ask
questions. JIRA is used for tracking bugs and features only.
PS:
- you should update to 1.8.8
- merging the pdfs using the command line tool works perfect
- you should use a new document for the merged pdf
> 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
> Assignee: Andreas Lehmkühler
> 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 = 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]