Jack Munchen
Jack Munchen

Reputation: 45

How can I remove images from a PDF of a given size using ghostscript?

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.

Upvotes: 2

Views: 346

Answers (1)

KenS
KenS

Reputation: 31197

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.

Upvotes: 1

Related Questions