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

pdfcop cannot parse PDFs I give as argument | origami 2.1.0 #90

Open
R-W-0 opened this issue Dec 24, 2024 · 0 comments
Open

pdfcop cannot parse PDFs I give as argument | origami 2.1.0 #90

R-W-0 opened this issue Dec 24, 2024 · 0 comments

Comments

@R-W-0
Copy link

R-W-0 commented Dec 24, 2024

When running pdfcop README.pdf pdfcop seems to crash. I tried this with origami installed via gem and via pacman. But it doesn't seem to want to work.

Can someone tell me if I'm doing something wrong or missing something? Or that there is something else going on?

OS info:

  Operating system name:     Arch Linux
  Operating system version:  Rolling release
  Kernel version:            6.6.67
  Hardware platform:         x86_64

I also installed necessary dependencies via gem:

gem install optparse yaml digest fileutils rexml matrix
gem install minitest -v 5.0.8
gem install colorize -v 0.7.7

The file:

Test documentation
This directory contains the documentation for:
• Creating a Test to distribute within your team
• Creating a personal test
• Importing a distributed test

The error:

[2024-12-24 11:55:01 +0100] PDFcop is running on target `README.pdf', policy = `standard'
[2024-12-24 11:55:01 +0100]   File size: 55260 bytes
[2024-12-24 11:55:01 +0100]   SHA256: 99a381b0279edc78a1653a932021c1c33a08ac24d92aafa7d0b4d74f87cac762
[error] Breaking on: "\n/ModDate ..." at offset 0xce97
[error] Last exception: [Origami::InvalidObjectError] Failed to parse object (no:49,gen:0)
	 -> [ArgumentError] wrong number of arguments (given 1, expected 0; required keyword: year)
[error] Manually fix the file or set :ignore_errors parameter.
[error] Cannot read : "\n/ModDate ..."
[error] Stopped on exception : Failed to parse object (no:49,gen:0)
	 -> [ArgumentError] wrong number of arguments (given 1, expected 0; required keyword: year)
[2024-12-24 11:55:01 +0100] An error occured during analysis : Origami::InvalidPDFError (Broken catalog)
[2024-12-24 11:55:01 +0100] Document rejected by policy `standard', caused by "Analysis failure".
/home/$USER/.local/share/gem/ruby/3.3.0/gems/origami-2.1.0/lib/origami/catalog.rb:42:in `Catalog': Broken catalog (Origami::InvalidPDFError)
	from /home/$USER/.local/share/gem/ruby/3.3.0/gems/origami-2.1.0/lib/origami/signature.rb:173:in `signed?'
	from /home/$USER/.local/share/gem/ruby/3.3.0/gems/origami-2.1.0/lib/origami/parsers/pdf.rb:81:in `parse_finalize'
	from /home/$USER/.local/share/gem/ruby/3.3.0/gems/origami-2.1.0/lib/origami/parsers/pdf/linear.rb:69:in `parse'
	from /home/$USER/.local/share/gem/ruby/3.3.0/gems/origami-2.1.0/lib/origami/pdf.rb:136:in `read'
	from /home/$USER/.local/share/gem/ruby/3.3.0/gems/origami-2.1.0/bin/pdfcop:357:in `<top (required)>'
	from /home/$USER/.local/share/gem/ruby/3.3.0/bin/pdfcop:25:in `load'
	from /home/$USER/.local/share/gem/ruby/3.3.0/bin/pdfcop:25:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant