Hi
I am using aspose-total-net 24.1.0 (python) to extract images from the pdf. Iam running the code on Debian GNU/Linux 11 (bullseye) using Python 3.11.10. However when I run the below code
It seems that you are encountering a RuntimeError when trying to extract images from a PDF using Aspose.PDF on a Linux environment. The error message indicates that the image type you are trying to save is not supported.
Here are a few steps you can take to troubleshoot and resolve this issue:
Check Image Type: Ensure that the image you are trying to extract is of a supported type. Aspose.PDF supports various image formats, but some formats may not be supported on all platforms. You can check the type of the image before saving it.
Use a Different Output Stream: Instead of using io.FileIO, try using a different method to create the output stream. For example, you can use open() with the ‘wb’ mode to write binary data:
with open("sample.jpg", "wb") as outputImage:
xImage.save(outputImage)
Update Aspose.PDF: Ensure that you are using the latest version of Aspose.PDF for Python. Sometimes, issues are resolved in newer releases, so updating might help.
Check for Dependencies: Make sure that all necessary dependencies for Aspose.PDF are installed and properly configured on your Linux system.
Consult Documentation: Review the Aspose.PDF documentation for any platform-specific notes regarding image extraction. There may be additional requirements or limitations when running on Linux.
If the issue persists after trying these steps, consider reaching out to the Aspose support team or checking the Aspose forums for similar issues encountered by other users.
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): PDFPYTHON-308
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
The ticket has recently been logged and is not yet investigated. We will prioritize it on a first come first serve basis and as soon as we have some updates regarding its resolution, we will inform you. Please spare us some time.
If possible, can you please provide any sample PDF with which you are facing this error in your environment? It will help us in reproducing the issue and investigate it accordingly.
No updates are available yet. We are performing investigation and as soon as we have some results to share, we will let you know. Please spare us some time.