[ 
https://issues.apache.org/jira/browse/PDFBOX-1511?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14095996#comment-14095996
 ] 

Tilman Hausherr commented on PDFBOX-1511:
-----------------------------------------

To verify this we need
- a file with global resources
- to create an uncompressed copy where we shuffle the names of the resources
- merge it and see what happens.
I did try it and no mayhem followed, there were no longer global resources in 
the merged file. However I can't share the file (PDFBOX-2048) but I need one 
that I can attach it here so that Michael and Kirk can also have a look. Now 
that GSoC2014 is done and weather is less warm I'll run my tests on the 
digitalcorpora site until I hit a file with global resources.



{code}
PDResources globalRes = document.getDocumentCatalog().getPages().getResources();
if (globalRes != null)
{
    System.out.println ("global resources size: " + 
globalRes.getXObjects().size());
    for (String key : globalRes.getXObjects().keySet())
    {
        System.out.println ("global resource: " + key);
    }
}
else
    System.out.println ("no global resources");
{code}


> 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.7, 2.0.0
>
>         Attachments: 1.pdf, 2.pdf, PDFMergerUtility.java, 
> PDFMergerUtility.java.diff, 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 astounding 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 PdfRenderer.java)
> I checked everything that comes in mind to find the differences, e.g. Java 
> version, encoding/codepage issues, memory settings, found nothing.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to