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

[ERROR] Ignore page 1 due to making page error: invalid literal for int() with base 16: 'x1' #330

Open
JoshhMiranda opened this issue Dec 6, 2024 · 3 comments

Comments

@JoshhMiranda
Copy link

JoshhMiranda commented Dec 6, 2024

Description of the bug

Currently facing an issue when using Converter to convert pdf to docx. The code was working fine 10 hours ago but now fails, with no fix. Parse fails as well

How to reproduce the bug

1) Using Converter

from pdf2docx import Converter
source = "path/to/source.pdf"
target = "path/to/target.docx"
cv = Converter(source)
cv.convert(target)
cv.close()

error: [ERROR] Ignore page 1 due to making page error: invalid literal for int() with base 16: 'x1'

2) using Parse

from pdf2docx import parse
source = "path/to/source.pdf"
target = "path/to/target.docx"
parse(source, target)

error: [ERROR] Ignore page 1 due to making page error: invalid literal for int() with base 16: 'x1'

pdf2docx version

0.5.8

Operating system

Linux

Python version

3.10

@jcgarciaca
Copy link

pdf2docx depends on fonttools and PyMuPDF. They were recently updated. So, I downgraded them (though I’m not sure if the issue was caused by one or both). However, this worked for me.

@JoshhMiranda
Copy link
Author

Thanks @jcgarciaca, downgrading to these versions made it work!
pip install PyMuPDF==1.24.14
pip install fonttools==4.55.0

@Dishendramishra
Copy link

Thanks @jcgarciaca, downgrading to these versions made it work! pip install PyMuPDF==1.24.14 pip install fonttools==4.55.0

I found it preferable to install fonttools first, then PyMuPDF as fonttools is a dependency for PyMuPDF.
pip install fonttools==4.55.0
pip install PyMuPDF==1.24.14

skysomorphic added a commit to qbreader/packet-parser that referenced this issue Jan 11, 2025
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

3 participants