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

Non-zero exit status 3 #12

Open
GregorySchwartz opened this issue Aug 14, 2024 · 4 comments
Open

Non-zero exit status 3 #12

GregorySchwartz opened this issue Aug 14, 2024 · 4 comments

Comments

@GregorySchwartz
Copy link

Using pdf-sign file.pdf, I receive the error below. I haven't run into this before the new version (maybe when pdftk was used?). Seems to be for only some files.

WARNING: file.pdf, object 52 0 at offset 395659: this widget annotation is not reachable from /AcroForm in the document catalog
WARNING: file.pdf, object 55 0 at offset 387012: this widget annotation is not reachable from /AcroForm in the document catalog
WARNING: file.pdf, object 58 0 at offset 378362: this widget annotation is not reachable from /AcroForm in the document catalog
WARNING: file.pdf (object 10 0): object has offset 0
WARNING: file.pdf (object 15 0): object has offset 0
WARNING: file.pdf (object 414 0): object has offset 0
WARNING: file.pdf, object 52 0 at offset 395659: this widget annotation is not reachable from /AcroForm in the document catalog
WARNING: file.pdf, object 55 0 at offset 387012: this widget annotation is not reachable from /AcroForm in the document catalog
WARNING: file.pdf, object 58 0 at offset 378362: this widget annotation is not reachable from /AcroForm in the document catalog
qpdf: operation succeeded with warnings; resulting file may have some problems
Traceback (most recent call last):
  File "/nix/store/ic3q5cr8jx5ghwhw2k8sccvn6dhd2jzj-pdf-sign-git/bin/.pdf-sign-wrapped", line 755, in <module>
    main(parser.parse_args(sys.argv[1:] or ['-h']))
  File "/nix/store/ic3q5cr8jx5ghwhw2k8sccvn6dhd2jzj-pdf-sign-git/bin/.pdf-sign-wrapped", line 38, in main
    qpdfOrPdftk([
  File "/nix/store/ic3q5cr8jx5ghwhw2k8sccvn6dhd2jzj-pdf-sign-git/bin/.pdf-sign-wrapped", line 487, in qpdfOrPdftk
    subprocess.run(cmd, check=True)
  File "/nix/store/7hnr99nxrd2aw6lghybqdmkckq60j6l9-python3-3.11.9/lib/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['qpdf', '--flatten-annotations=all', '--generate-appearances', 'file.pdf', '/tmp/tmpmu_7ot87/input.pdf']' returned non-zero exit status 3.
@svenssonaxel
Copy link
Owner

@GregorySchwartz Would be great if you could provide 1) An example problematic file without sensitive content and 2) The nix flake producing ic3q5cr8jx5ghwhw2k8sccvn6dhd2jzj or versions for pdf-sign and qpdf.

@svenssonaxel
Copy link
Owner

@GregorySchwartz Bump. An example file might be enough.

@GregorySchwartz
Copy link
Author

Unfortunately the only files I could reproduce this with have sensitive information...

svenssonaxel added a commit that referenced this issue Oct 26, 2024
@svenssonaxel
Copy link
Owner

@GregorySchwartz Could you please test branch dev?

  1. Executing as before, you should see the same warnings, but no traceback. pdf-sign should print qpdf exited with code 3, indicating warnings. Use --continue-on-warnings to ignore. and exit with code 1.
  2. Adding --continue-on-warnings to the invocation should cause pdf-sign to function normally, except the warnings should still be printed.

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

2 participants