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

PDF version 1.5 yields RuntimeException #483

Open
beatngu13 opened this issue Jan 5, 2024 · 1 comment
Open

PDF version 1.5 yields RuntimeException #483

beatngu13 opened this issue Jan 5, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@beatngu13
Copy link
Owner

Expected Behavior

This PDF can be modified to set its bookmarks to "Fit width".

Actual Behavior

A RuntimeException is thrown:

java.lang.RuntimeException: Invalid PDF version format: '^(\d+)\.(\d+)$' pattern expected.
	at org.pdfclown.Version.get(Version.java:72)
	at org.pdfclown.Version.get(Version.java:62)
	at org.pdfclown.documents.Document.getVersion(Document.java:539)
	at org.pdfclown.objects.PdfObjectWrapper.checkCompatibility(PdfObjectWrapper.java:358)
	at org.pdfclown.documents.Document.access$1(Document.java:1)
	at org.pdfclown.documents.Document$Configuration.setXrefMode(Document.java:166)
	at org.pdfclown.files.File.<init>(File.java:192)
	at org.pdfclown.files.File.<init>(File.java:171)
	at com.github.beatngu13.pdfzoomwizard.core.Wizard.modifyFile(Wizard.java:132)

Steps to Reproduce

If possible, please provide a sample PDF and describe the steps to reproduce the behavior:

  1. Select the aforementioned PDF
  2. Uncheck "Copy"
  3. Select "Fit width"
  4. Click on "Run"
  5. "Success" is reported, although the PDF is not modified
  6. The log file shows a RuntimeException is thrown

Debugging shows that the PDF version 1.5 is converted to 1#2E5, which yields the exception in org.pdfclown.Version.

Log

log.txt

Environment

  • OS: macOS 13.5.2
  • PDF Zoom Wizard version: 0.13.0
@beatngu13 beatngu13 added the bug Something isn't working label Jan 5, 2024
@beatngu13 beatngu13 self-assigned this Jan 5, 2024
@beatngu13
Copy link
Owner Author

beatngu13 commented Jan 5, 2024

@idsks555 while I'm further investigating the underlying issue, here's the converted PDF (fit width):

Old_._New_Testament-FIT-WIDTH.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant