Is it possible to get the page size (from e.g. a PDF document page) using GhostScript? I have seen the “bbox” device, but it returns the bounding box (it differs per page), not the TrimBox (or CropBox) of the PDF pages. (See http://www.prepressure.com/pdf/basics/page_boxes for info about page boxes.) Any other possibility?
Share
Meanwhile I found a different method. This one uses Ghostscript only (just as you required). No need for additional third party utilities.
This method uses a little helper program, written in PostScript, shipping with the source code of Ghostscript. Look in the toolbin subdir for the
pdf_info.psfile.The included comments say you should run it like this in order to list fonts used, media sizes used
I did run it on a local example file, with commandline parameters that ask for the media sizes only (not the fonts used). Here is the result: