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

pdftocio throws error when saving #27

Open
amzon-ex opened this issue Sep 24, 2023 · 1 comment
Open

pdftocio throws error when saving #27

amzon-ex opened this issue Sep 24, 2023 · 1 comment

Comments

@amzon-ex
Copy link

Hi, I'm trying to use pdftocio to generate a ToC for a pdf. I have already generated the toc file using pdfxmeta and 'pdftocgen`. The error is as following:

Traceback (most recent call last):
  File "/home/amzon-ex/.local/bin/pdftocio", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/amzon-ex/.local/lib/python3.11/site-packages/pdftocio/app.py", line 163, in main
    doc.save(out)
  File "/home/amzon-ex/.local/lib/python3.11/site-packages/fitz/fitz.py", line 4710, in save
    return _fitz.Document_save(self, filename, garbage, clean, deflate, deflate_images, deflate_fonts, incremental, ascii, expand, linear, no_new_id, appearance, pretty, encryption, permissions, owner_pw, user_pw)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: cannot find object in xref (2818 0 R)

Can you help?

@Krasjet
Copy link
Owner

Krasjet commented Nov 26, 2023

seems to be a corrupted pdf file. might be related pymupdf/PyMuPDF#352

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