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 6815789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:50:55+00:00 2026-05-26T20:50:55+00:00

If one has, for example, a pdf with the wrong page size specified one

  • 0

If one has, for example, a pdf with the wrong page size specified one can crop away the unwanted portions of the document with ghostscript and the command parameter /CropBox. My question is, what do the numbers in the command refer to? I know they are point units (72nds of an inch) but what are their origins and axes?

By dint of trail and error from this example I’ve come up with following to keep an area approximately 6″x4″ from the top left corner of a 11″x8.5″ page (example source pdf). I’d like to do the math though and get my numbers precise instead of approximate (my final page needs to be landscape A6, 5.83″x4.13″).

gswin64c ^
-o fixed-A6.pdf ^
-sDEVICE=pdfwrite ^
-c "[/CropBox [0 315 420 610] /PAGES pdfmark" ^
-f landscape-letter-size.pdf

Also, are the brackets [ ] supposed to be unbalanced? The opening [/Crop... doesn’t have a corresponding close.

  • 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-26T20:50:56+00:00Added an answer on May 26, 2026 at 8:50 pm

    They have the same origin as the other boxes defined in the Page object (eg default to units in Points with the origin to the lower left corner. You can see the PDF 1.7 documentation for further reference. There are some commands that can reside on higher level objects (Pages) that change the coordinate system by the way but those are rare (and when you create your PDF yourself with ghostscript you would know)..

    Each number is referenced from the bottom left corner margin. So from the example 0 315 means 0pt from the left and 315pt above the bottom, and 420 610 is the opposite corner of the rectangle, from the same origin. [0 315 420 610] = rectangle (left bottom right top)

         ****************************************************
     610 ----------------------X 420,610                    *
         |                     |                            *
         |                     |                            *
         |                     |                            *
         |                     |                            *
         |                     |                            *
         |                     |                            *
         |                     |                            *
         |0,315                |                            *
     315 X----------------------                            *
         *                                                  *
         *                                                  *
         *                                                  *
         *                                                  *
         *                                                  *
         *                                                  *
         *                                                  *
         *                                                  *
       0 ****************************************************
         0                    420
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

C# has syntax for declaring and using properties. For example, one can declare a
How can I find elements that has at least one attribute? Example: <tr>...</tr> <tr
Greetings everyone. Can any one has a working example for the CoreTelephony framework? I
Let’s take this string has an example: D:/firstdir/Another One/and 2/bla bla bla/media/reports/Darth_Vader_Report.pdf I want
I used to have one class for one file. For example car.cs has the
I have a table, has many rows. for example one of from rows(all rows
I have a table, has many rows. for example one of from rows(all rows
If page has .pdf files linked then a message in <p> should be add
There has been many Questions recently about drawing PDF's. Yes, you can render PDF's
Our website has one section which often changes to match the user. (examples are

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.