error: Can't convert ObjectHelper (or subclass) to Object implicitly. Use .obj to get access the underlying object. #132
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Trying to use img2pdf on Macos 11.3.1, python3 version 3.9.10
Cloned
3da370d3bd
and did the install as in the README.mdGoogling a bit gave this: https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg1836703.html
Is it related somehow?
Maybe. Can you share your input tif image?
Here is a link to a tif that it chokes on:
https://drive.google.com/file/d/1YH3SWGaWeo78MtLTQFMOXFMoVX8PaYbR/view?usp=sharing
But it appear not be to be this specific file that causes it. Downloaded a sample tif that I got from a few seconds of googling and it give the same result:
https://people.math.sc.edu/Burkardt/data/tif/at3_1m4_01.tif
Interesting. It doesn't fail for me. Can you run img2pdf with --verbose to get a better error message?
Here is the full log using the file mentioned above.
I think this exception is raised by pikepdf in
object_convert.cpp
and related to the changes in commit pikepdf/8255bc3. In the meantime, you could use the internal PDF backend of img2pdf:--engine internal
.Thanks. That indeed prevented it from crashing.
But the file got every picture repeated twice. The second one with much lower resolution.
https://drive.google.com/file/d/1lE2jr-8Fa4FUPX9tE66UuovXcqUREWTy/view?usp=sharing
Interestingly the full res pictures are shown as white in Google Drive viewer while they display perfectly in Macos Preview. Perhaps the image size (5000x7000 pixels) is to big for the Google Drive viewer? But show this second identical image.
How can I get rid of this low resolution "thumbnail" picture spliced in after each picture?
I believe you need
--first-frame-only
. (Your image apparently has an embedded thumbnail as second frame.)Thanks a lot! Indeed that solved the problem. Wasn't expecting there to be a thumbnail embedded. Feel free to close the issue.
You're welcome, glad I could help.
The issue with the pikepdf backend that you reported is a valid problem, thus I'd say the ticket should remain open until this is addressed.
As I'm unable to reproduce this problem, can one of you who can reproduce it file a bug against pikepdf? Thanks!
@mara0004 I think maybe you deleted your last comment?
I have python3-pikepdf 4.2.0 installed and as far as I can see, pikepdf/8255bc3 was already included in 4.2.0.
Calling it with pdf arranger froze it whatever the png. CLI verbose gave this
(Manjaro, git compile, python3-pikepdf 5.0.1-1)
I now filed this issue: https://github.com/pikepdf/pikepdf/issues/313