Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unknown PDF Root version: 1#2E5 #175

Closed
mtzanidakis opened this issue Mar 26, 2020 · 4 comments
Closed

unknown PDF Root version: 1#2E5 #175

mtzanidakis opened this issue Mar 26, 2020 · 4 comments
Assignees
Labels

Comments

@mtzanidakis
Copy link

Hello,
we have a pdf with a weird root version.

$ pdfcpu version
pdfcpu: v0.3.2 dev

$ pdfcpu info version_error.pdf
identifyRootVersion: unknown PDF Root version: 1#2E5
: 1#2E5

With something like that:

diff --git a/pkg/pdfcpu/version.go b/pkg/pdfcpu/version.go
index d666e4c..211ec9c 100644
--- a/pkg/pdfcpu/version.go
+++ b/pkg/pdfcpu/version.go
@@ -54,7 +54,7 @@ func PDFVersion(versionStr string) (Version, error) {
                return V13, nil
        case "1.4":
                return V14, nil
-       case "1.5":
+       case "1.5", "1#2E5":
                return V15, nil
        case "1.6":
                return V16, nil

it works.

The pdf in question

Thanks in advance

@hhrutter
Copy link
Collaborator

Thanks for reporting this!

@hhrutter hhrutter added the bug label Mar 26, 2020
@hhrutter hhrutter self-assigned this Mar 26, 2020
hhrutter added a commit that referenced this issue May 25, 2020
@hhrutter
Copy link
Collaborator

Fixed with v0.3.3

@thorsted
Copy link

Curious if this issue was fixed to ignore the Catalog version entry as it is an optional key or should it still be flagged as a validation error?

@hhrutter
Copy link
Collaborator

I don't know if this answers your question but
the optional Version entry in the catalog cannot be ignored since its intention is to override the header version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants