-
Notifications
You must be signed in to change notification settings - Fork 510
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
RuntimeError: image is too high for a long paged pdf file when trying get_pixmap() #1995
Comments
There is an in-built limit of 65536 pixels to image width and height in MuPDF (not PyMuPDF). MuPDF will be updated to accept larger values, up to at least the next power of 2 = 131,072. But this will not happen in the release to be published shortly, but in the version following that one. Sorry, bad timing. Maybe you can use a way to shrink the images before inserting them. I know no details of your process, but maybe there is a way to use the |
Can you tell me what you used to see the pixel size of the PDF page. I'm struggling to find that. As you see the max length of the page is 3480. I started of with an initial tiff (very long), converted it to a PDF and the used Fitz to split it into page sizes which are 3480px long using the following code. I wonder how you got the 90,000+ pixels?
|
It is not the size of the page, but the size of the image displayed by the page. The image height of 92 k-pixels is the problem. |
Please provide all mandatory information!
Describe the bug (mandatory)
I have a pdf which is 3480 pixels long per page. For each of the pages I am trying get_pixmap(). This gives me the following error
RuntimeError: image is too high
To Reproduce (mandatory)
Screenshots (optional)
Your configuration (mandatory)
Additional context (optional)
I split a very long pdf into pages which are 3480ppx long (aws textract limit for page size). If I split it into smaller lengths, then I'll have more pages which will be more expence to process (AWS charges $$/page)
PDF File-
https://drive.google.com/file/d/13uld7nQ5u8-oxvBIyr3ZykGVPphHeda4/view?usp=sharing
The text was updated successfully, but these errors were encountered: