1

I'd like to remove some images from a PDF, but only images that match a certain criteria in terms of size (height x width). Is this possible using ghostscript?

I've seen some answers for removing all images, but not for only some images.

  • Do you mean remove (as in "obliterate/delete") so that anyone reading the PDF can no longer see them? Or remove (as in "extract") so that you have them available somewhere else? – Mark Setchell Oct 29 '14 at 09:56
  • Thank you for your reply. I mean obliterate/delete. And I specifically want the element removed, not just resized or invisible. – Jack Munchen Oct 29 '14 at 15:02

1 Answers1

1

You could redefine the image operator to check the height and width of an image, and if it is too large you could install the nulldevice for the duration of the image.

That will require some PostScript programming of course.

KenS
  • 30,202
  • 3
  • 34
  • 51