Skip to content
Discussion options

You must be logged in to vote

I believe you were taken in the wrong direction by using the verb "crop" which is not applicable here.
What you seem to mean is taking a picture of only the drawing. This works by using the drawing's bbox as a clip area like this: pix = page.get_pixmap(clip=bbox). Then do pix.save("some.jpg") (or .png).
If you want, you can improve image resolution by using the dpi parameter when creating the pixmap.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@shaojun
Comment options

@JorjMcKie
Comment options

Answer selected by shaojun
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
Converted from issue

This discussion was converted from issue #2797 on November 10, 2023 08:50.