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

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.