pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maruan Sahyoun <sahy...@fileaffairs.de>
Subject Re: PDFMerger App also produces Garbage
Date Thu, 07 Feb 2013 07:51:08 GMT
Hi Michael,

could you check potential differences between Eclipse and command line e.g. java version used,
memory settings ….

Are you using the same PDFBox version from command line and Eclipse. E.g. when using Maven
you might have set it to import 1.8.0-SNAPSHOT.

Could you also share the sample code you are using from within Eclipse.

Just asking for completeness.

With kind regards,

Maruan Sahyoun

Am 07.02.2013 um 08:45 schrieb "Huber, Michael" <Michael.Huber@bayernlb.de>:

> Hi Maruan,
> 
> thanks for he quick answer.
> 
> No, didn't solve the Problem. Same picture: Works with Eclipse Juno but not on the cmd
line.
> 
> I'll file a bug and attach same short pdf files to reproduce the error.
> 
> With kind regards,
> 
> Michael
> 
> -----Urspr√ľngliche Nachricht-----
> Von: Maruan Sahyoun [mailto:sahyoun@fileaffairs.de] 
> Gesendet: Mittwoch, 6. Februar 2013 17:17
> An: users@pdfbox.apache.org
> Betreff: Re: PDFMerger App also produces Garbage
> 
> Hi,
> 
> one thing you can test is using the NonSequentialParser for parsing the source files.
Unfortunately the PDFMergerUtility doesn't yet allow using that parser. So you would need
to take the source and change PDDocument.load to PDDocument.loadNonSeq. Is that an option
for you?
> 
> You may want to raise an issue in Jira ((https://issues.apache.org/jira/browse/PDFBOX)
so the issue is not forgotten
> 
> With kind regards
> 
> Maruan Sahyoun
> 
> Am 06.02.2013 um 16:37 schrieb "Huber, Michael" <Michael.Huber@bayernlb.de>:
> 
>> Hi,
>> 
>> same problem with pdfbox-app PDFMerger cmd line utility.
>> 
>> Java -version output:
>> java version "1.6.0_21"
>> Java(TM) SE Runtime Environment (build 1.6.0_21-b07)
>> Java HotSpot(TM) Client VM (build 17.0-b17, mixed mode)
>> 
>> Cmd line used:
>> java -jar pdfbox-app-1.7.1.jar PDFMerger  c:\temp\1.pdf c:\temp\2.pdf c:\temp\m.pdf
>> 
>> If You need the files pls let me know.
>> 
>> THX for help,
>> 
>> Michael
>> 
>> 
>> Von: Huber, Michael
>> Gesendet: Mittwoch, 6. Februar 2013 11:31
>> An: 'users@pdfbox.apache.org'
>> Betreff: PDFMergerUtility produces Garbage
>> 
>> Hello all,
>> 
>> i'am using the PDFMergerUtility to merge a bunch of pdf files created by graphviz
into one pdf. The pdf files created by graphviz are readable by acrobat reader X.
>> 
>> Problem:
>> The merged output pdf is fine when run under Eclipse Juno SR1, Java 1.6 runtime.
>> The output is garbage when run from executable jar from windows cmd line.
>> 
>> Any Idea?
>> 
>> Thanks in advance,
>> 
>> Michael
>> 
>> Java code:
>> The Vector "images" simply contains a list of fqdn to pdf files created by graphviz
>> 
>>     public void addToMainPdf(Vector<String> images) throws COSVisitorException,
IOException {
>> 
>>           File mpdf = new File(mainPdfFile);
>>           mpdf.delete();
>> 
>>           PDFMergerUtility pdfMergerUtility = new PDFMergerUtility();
>>           pdfMergerUtility.setDestinationFileName(mainPdfFile);
>>           log.info("Erzeuge pdf " + mainPdfFile);
>> 
>>           for (String imagePdf : images) {
>>                 log.info("Lade Seite: " + imagePdf);
>>                 pdfMergerUtility.addSource(imagePdf);
>>           }
>>           pdfMergerUtility.mergeDocuments();
>>           log.info("pdf wurde erzeugt: " + mainPdfFile);
>>     }
>> 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message