Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.postscript > #1064 > unrolled thread

tool that shows the same PDF coordinates as ghostscript uses

Started byNomen Nescio <nobody@dizum.com>
First post2012-11-19 15:18 +0100
Last post2012-11-19 17:59 +0000
Articles 2 — 2 participants

Back to article view | Back to comp.lang.postscript


Contents

  tool that shows the same PDF coordinates as ghostscript uses Nomen Nescio <nobody@dizum.com> - 2012-11-19 15:18 +0100
    Re: tool that shows the same PDF coordinates as ghostscript uses ken <ken@spamcop.net> - 2012-11-19 17:59 +0000

#1064 — tool that shows the same PDF coordinates as ghostscript uses

FromNomen Nescio <nobody@dizum.com>
Date2012-11-19 15:18 +0100
Subjecttool that shows the same PDF coordinates as ghostscript uses
Message-ID<a2d8a7c7d93d8c0228a5b95e227bcb6e@dizum.com>
The PDF format takes the bottom left corner of a document to be the
origin (0,0). This makes it difficult to get coordinates for cropping
because Ghostscript's /CropBox command uses this coordinate
system. Consequently, the display command cannot easily be used to get
coordinates.

Is there a graphical tool that will directly give the /CropBox
coordinates for a selected region?

BTW, coordinates from the display command cannot be translated either,
because it finds a different page area geometry than the pdfinfo
command.

[toc] | [next] | [standalone]


#1065

Fromken <ken@spamcop.net>
Date2012-11-19 17:59 +0000
Message-ID<MPG.2b1483d39712f1e29898a2@usenet.plus.net>
In reply to#1064
In article <a2d8a7c7d93d8c0228a5b95e227bcb6e@dizum.com>, 
nobody@dizum.com says...
 
> The PDF format takes the bottom left corner of a document to be the
> origin (0,0). This makes it difficult to get coordinates for cropping
> because Ghostscript's /CropBox command uses this coordinate
> system.

Ghostscript doesn't have a /CropBox command. It does have -dUseCropBox, 
and that obviously uses the PDF user space co-orindates as given by the 
PDF file.


> Is there a graphical tool that will directly give the /CropBox
> coordinates for a selected region?

A 'selected region' ? CropBox is a per page entry in the page 
dictionary, so a 'selected region' doesn't mean much.

You can use pdf_info.ps, in the Ghostscript 'toolbin' directory, teh 
usage is at the top of the file, here it is anyway:

% usage: gs -dNODISPLAY -q -sFile=____.pdf [-dDumpMediaSizes] [-
dDumpFontsUsed [-dShowEmbeddedFonts] ] toolbin/pdf_info.ps


This produces the actual values from the page dictionary /CropBox array.


			Ken

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.postscript


csiph-web