-
Notifications
You must be signed in to change notification settings - Fork 27
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
DCT Decoding Error #101
Comments
DCT decoder is not supported at this point. Feel free to contribute. |
@admercs can you share the file please? I can try to add the decoder. |
I cannot, sorry.
…On Sat, Nov 5, 2022 at 15:25 Maksym Polshcha ***@***.***> wrote:
@admercs <https://github.com/admercs> can you share the file please? I
can try to add the decoder.
—
Reply to this email directly, view it on GitHub
<#101 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABL4FIFI7M2WKOAORFAYGJTWG2YEPANCNFSM6AAAAAAQONW3GQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
What would you think about not raising an error, but returning the same bytes back to the caller? pypdf library does this : https://github.com/py-pdf/pypdf/blob/e92b20e0b35e4feb5a2a7f347de7a4c3f713011a/pypdf/filters.py#L510 LMK if you want me to create the MR, I'd be happy to contribute. |
Raw stream data can be accessed directly for any pdfreader/pdfreader/types/native.py Lines 88 to 89 in fb8189a
This should work for any As for the suggestion to return raw data with unimplemented filters - I see pros and cons. Ideally we need to have this decoder implemented. Feel free to create a PR and contribute. |
@canbolukbas can you also attach your file please? I don't have PDFs with DCT streams. Thanks! |
Just realized that it's a very trivial patch. It's on master. The support added on #132 |
For what it's worth, DCT corresponds to JPEG, so should be trivial to create a sample. Just run img2pdf on an arbitrary JPEG image from the web, or drag one into Libreoffice and export to PDF. |
I'm getting the following error:
Any idea how to resolve it?
The text was updated successfully, but these errors were encountered: