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);
      }

Reply via email to