Skip to content
Discussion options

You must be logged in to vote

Vector graphics usually / often consist of many "atomic" draw commands like lines, curves, rectangles. They appear as a holistic graphic because of the geometrical vicinity of the atoms.
To be clear: These are no images and therefore cannot be extracted as such.
You can extract the drawings on a page via page.get_drawings(), which gives yo all this details. But these are Python dictionaries - no images.
You can also use page.cluster_drawings() which detects and clusters drawing atoms that are sufficiently close to each other.
It returns a list of rectangles which represent those clusters. Make a pixmap using a cluster rectangle as clip value - then you can save it as an image somewhere.

Replies: 1 comment 2 replies

Comment options

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

@kalle07
Comment options

Answer selected by JorjMcKie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants