title: What dimensions do the coordinates in PDF cropbox refer to?
body: <p>If one has, for example, a pdf with the wrong page size specified one can crop away the unwanted portions of the document with <a href="/questions/tagged/ghostscript" class="post-tag" title="show questions tagged &#39;ghostscript&#39;" rel="tag">ghostscript</a> and the command parameter <code>/CropBox</code>. 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?</p>
  
  <p>By dint of trail and error from <a href="https://stackoverflow.com/questions/5797841/cropping-a-pdf-adding-crop-box-using-ghostscript/5801205#5801205">this example</a> I've come up with following to keep an area approximately 6"x4" from the top left corner of a 11"x8.5" page (<a href="http://min.us/mYn0omgNP" rel="nofollow noreferrer">example source pdf</a>). 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").</p>
  
  <pre><code>gswin64c ^
  -o fixed-A6.pdf ^
  -sDEVICE=pdfwrite ^
  -c "[/CropBox [0 315 420 610] /PAGES pdfmark" ^
  -f landscape-letter-size.pdf
  </code></pre>
  
  <p>Also, are the brackets <code>[ ]</code> <em>supposed</em> to be unbalanced? The opening <code>[/Crop...</code> doesn't have a corresponding close.</p>