[ https://issues.apache.org/jira/browse/PDFBOX-1511?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13573405#comment-13573405 ]
Maruan Sahyoun commented on PDFBOX-1511: ---------------------------------------- as a quick hack you can add the line newPage.setResources(new PDResources((COSDictionary) cloner.cloneForNewDocument(srcResources))); in the appendDocument method of PDFMergerUtility around line 410 after newPage.setRotation( page.findRotation() ); As this creates a new resource for each page the resulting PDF file will be large than necessary. > pdfMerger App produces Garbage > ------------------------------ > > Key: PDFBOX-1511 > URL: https://issues.apache.org/jira/browse/PDFBOX-1511 > Project: PDFBox > Issue Type: Bug > Components: Utilities > Affects Versions: 1.7.1 > Environment: Win XP; Windows Server 2008 R2; java version "1.6.0_21", > Reporter: Michael Huber > Fix For: 1.8.0 > > Attachments: 1.pdf, 2.pdf, PdfRenderer.java, targetPdfMergeJava.pdf, > targetPdfMergeUtilityApp.pdf > > > pdfbox Utility pdfMerger produces a merged document containing garbage. All > merged pdf files are contained but Strings are destroyed. > The source pdf files are created with graphviz and are readable without error > or disturbance both with Acrobat X and pdfbox pdfDebug Utility. > Another astoundig thing is that a handcoded merger using pdfMergerUtility > class works fine when run within Eclipse Juno and creates same garbage when > run from cmd line (pls. see attached source) > I checked everything that comes in mind to find the differences, e.g. Java > version, encoding/codepage issues, memory settings, found nothing. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira