🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.document.graphics.server
Article #88

Re: Obtaining the document size of a PDF

#88
From: Bob_Emerson
Date: Tue, 27 Jul 2004 15:48
9 lines
1316 bytes
There are two workarounds.

1. Convert the first page of the PDF to Raster and then do an imageInfo on the raster copy of the PDF. Parse the imageInfo--possibly outside of AGS although the adobe-content syntax can be useful in some situations. For an example of using the adobe-content sytnax, see the KB at: <http://support.adobe.com/devsup/devsup.nsf/docs/52547.htm>

2. Open the PDF as text and GREP for MediaBox. It is of the format:
 MediaBox[0.0 0.0 612 792]
If a CropBox is present you may need to take it into account.

Note: each page in a PDF can have a different page size and orientation--but many/most PDFs have the same values for all pages.
Technical Details
Message-ID: <3bb53773.0@webx.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!npeer.de.kpn-eurorings.net!feed.news.schlund.de!schlund.de!newsfeed01.sul.t-online.de!t-online.de!webx
References: <3bb53773.-1@webx.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1effe5,37f3236e83289e36
X-Google-Attributes: gid1effe5,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Bob_Emerson@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!npeer.de.kpn-eurorings.net!feed.news.schlund.de!schlund.de!newsfeed01.sul.t-online.de!t-online.de!webx
Newsgroups: adobe.document.graphics.server
Subject: Re: Obtaining the document size of a PDF
Message-ID: <3bb53773.0@webx.la2eafNXanI>
Date: Tue, 27 Jul 2004 08:48:02 -0700
References: <3bb53773.-1@webx.la2eafNXanI>
Lines: 14
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit