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

Using Flex 4 / Air 2.0.3 Is it possible to get the active directory
I am using PageIndexChanging event for handling GridView paging in C#. But don't know
Simply put, I would like to make java do what I want but I
I have a database which stores .png images as the sql image type. I
So here is a simple page I've stripped down to the bare minimum. Looks
In my web application, I have 2 totally different databases - one that's being
Often I find myself having a expression where a division by int is a
I'm working with Qt ( version 4.6 on Windows XP 32-bit and compiling in
For context, this is a followup to an earlier question . Rather than digging
Here is what i do <?php $id=97; $page_data = get_page($id); echo $page_data->post_content; ?> It's

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.