HTML to PDF / DOCX / RTF Java converter library Forums PD4ML v3 Archived Forums (Read Only) Troubleshooting Error with Merge PDF problem, pd4ML.jar method mergeDFs

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #27051

    I try to merge 2 PDF files
    This works fine almost every time
    But now we have some problems with PDF files

    Our code is as below

    public static boolean merge (String inFile1, String inFile2, String outFile){
    boolean success=false;
    try {
    InputStream inputstream1 = new FileInputStream(inFile1);
    InputStream inputstream2 = new FileInputStream(inFile2);
    OutputStream output = new FileOutputStream(outFile);

    org.zefer.pd4ml.PD4Document.mergePDFs(inputstream1, inputstream2, output);
    success=true;
    }
    catch(Exception e){
    System.out.println(e.getMessage());
    }

    return success;

    }

    The error message that we get is this
    org.zefer.pd4ml.npdf.parser.obj.h incompatible with org.zefer.pd4ml.npdf.parser.obj.d

    Do we use this method in wrong way?
    Why does some PDF files work and other don’t?

    #29842

    We’ve just fixed the issue in the development build.

    The reason is that in the problematic PDF an image size is unexpectedly given not as an integer, but as a reference to another object (which holds only an integer). Now the case is correctly worked around.

Viewing 2 posts - 1 through 2 (of 2 total)

The forum ‘Troubleshooting’ is closed to new topics and replies.