Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 891715
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T13:55:58+00:00 2026-05-15T13:55:58+00:00

Is it possible to get the page size (from e.g. a PDF document page)

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T13:55:59+00:00Added an answer on May 15, 2026 at 1:55 pm

    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.ps file.

    The included comments say you should run it like this in order to list fonts used, media sizes used

    gswin32c -dNODISPLAY ^
       -q ^
       -sFile=____.pdf ^
       [-dDumpMediaSizes] ^
       [-dDumpFontsUsed [-dShowEmbeddedFonts]] ^
       toolbin/pdf_info.ps
    

    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:

    C:\> gswin32c ^
          -dNODISPLAY ^
          -q ^
          -sFile=c:\downloads\_IXUS_850IS_ADVCUG_EN.pdf ^
          -dDumpMediaSizes ^
          C:/gs8.71/lib/pdf_info.ps
    
    
      c:\downloads\_IXUS_850IS_ADVCUG_EN.pdf has 146 pages.
      Creator: FrameMaker 6.0
      Producer: Acrobat Distiller 5.0.5 (Windows)
      CreationDate: D:20060817164306Z
      ModDate: D:20060822122024+02'00'
    
      Page 1 MediaBox: [ 595 842 ] CropBox: [ 419.535 297.644 ]
      Page 2 MediaBox: [ 595 842 ] CropBox: [ 297.646 419.524 ]
      Page 3 MediaBox: [ 595 842 ] CropBox: [ 297.646 419.524 ]
      Page 4 MediaBox: [ 595 842 ] CropBox: [ 297.646 419.524 ]
      [....]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible for a web page using Javascript to get data from another
Is it possible to get a browser's home page using Javascript? I'd like to
Is it possible to get the value from the first page to the second
In .NET is it possible to get the HttpContext of the current page from
I want to get the gridview page size from the drop down from the
Is it possible to get page title via iText ? The PdfTextExtractor returns all
Is it possible to get the mouse position with JavaScript after page loads without
Possible Duplicate: Get all files from VSS for a given date? I need to
Possible Duplicate: Uploadify: show error message from HTTP response I am trying to get
I am using PHPExcel to create an Excel document, using data from a MySQL

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.