Skip to content

How to extract images while retaining Microsoft PowerPoint-like items layered on top of the images? #4040

Discussion options

You must be logged in to vote

You again did not include the PDF in question. So I still don't understand the problem and I am forced to guess:
You have a PDF page show some image and some annotation(s) hovering above?

If true you must make a picture of the page (and not extract the image). First find the image's boundary box on the page page.get_image_rects(xref), then make a pixmap using the bbox as clip: pix = page.get_pixmap(clip=bbox).

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@aimanwafiq12
Comment options

Answer selected by aimanwafiq12
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants