title: How to remove text from a PDF and save them via code using Python
body: <p>I;m using this library <strong>PYMUPDF</strong> (<a href="https://pymupdf.readthedocs.io/en/latest/page.html" rel="nofollow noreferrer">Documentation</a>) that offers various functions to deal with PDF documents using python.</p>
  <p><strong>What I want to achieve</strong>: I would like to extract all the images (I cannot use typical methods as the images are not raster. They are vectors with machine-readable text hence I would like to display the PDF page with just the image) and it's labels (i.e. &quot;Figure 1: XYZ&quot;) from a PDF document.</p>
  <p><strong>Where I am now</strong>: I am able to narrow down to the pages that contain images, convert the PDF page into an image and rename the file with it's labels.</p>
  <p>I'm hoping if is was a way to remove all text from the page, then I could save the image file with just the image (and some white space, which should be fine)</p>