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

    Hi all,

    I want create PDF and merge with existing PDF file.
    Unfortunately, existing PDF version is 1.3, so when process merge, error occurs like below:

    org.zefer.pd4ml.pdf.parser.b: Invalid PDF version format: PDF-1.3
    at org.zefer.pd4ml.pdf.parser.h.?o0000(Unknown Source)
    at org.zefer.pd4ml.pdf.parser.d.?00000(Unknown Source)
    at org.zefer.pd4ml.PD4ML.o00000(Unknown Source)
    at org.zefer.pd4ml.PD4ML.render(Unknown Source)
    at org.zefer.pd4ml.PD4ML.render(Unknown Source)

    pd4ml version is “pd4ml 3.85fx7 Pro”

    Could you please solve this problem?
    Thanks in advance..

    #29538

    In fact even PDF 1.3 should be ok for PD4ML. The exception is only tells, that the version number format is invalid. (The test is performed mostly to make sure a parsed file is PDF)

    [language=java:1gboopf0]String msg = “Invalid PDF version prefix: “;

    int index = -1;
    if (!comment.startsWith(“PDF-“) || (index = comment.indexOf('.')) < 0) {
    throw new ParseException( msg + comment );
    }
    try {
    versionMajor = Integer.parseInt(comment.substring(4, index));
    versionMinor = Integer.parseInt(comment.substring(index + 1));
    } catch (NumberFormatException exception) {
    throw new ParseException( msg + comment );
    }[/language:1gboopf0]

    I see, visually “PDF-1.3” is correct, and should pass the above test. So I would suspect there are trailing invisible chars etc.

    A PDF sample would help to analyze the issue.

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

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