Re: Using Ghostscript to Scale PDF Files
- From: ReproRog <roger.womersley@xxxxxxx>
- Date: Sun, 9 Dec 2007 01:21:52 -0800 (PST)
On Dec 9, 2:45 am, Helge Blischke <h.blisc...@xxxxxx> wrote:
ReproRog wrote:
I need to scale PDF files by a certain percentage whilst ripping to a
raster format like tiffg4 or pxl color. If I attempt to convert the
PDF (841mm x 594mm) directly to the raster format it doesn't scale (or
rotate or shift):
************************MyCommand.CMD**********************************
-dBATCH
-dNOPAUSE
-dSAFER
-r600
-sDEVICE=tiffg4
-sOutputFile=MyTif.tif
-c "<</Policies <</PageSize 5>> >> setpagedevice "
-c "<< 0.5 0.5 scale -90 rotate -2384 0 translate >> setuserparams"
-f MyPDF.PDF
**********************End MyCommand.CMD*****************************
If I first convert the PDF to EPS using epswrite then use a simliar
command file to the above to create the resultant tiffg4 file it
works.
*************************MyCommand1.CMD - PDF-
EPS******************************
-dBATCH
-dNOPAUSE
-dSAFER
-r600
-sDEVICE=epswrite
-sOutputFile=MyEps.EPS
-f MyPDF.PDF
************************End MyCommand1.CMD*************************
*************************MyCommand2.CMD - EPS-
TIFG4******************************
-dBATCH
-dNOPAUSE
-dSAFER
-r600
-sDEVICE=tiffg4
-sOutputFile=MyEps.TIF
-c "<</Policies <</PageSize 5>> >> setpagedevice "
-c "<< 0.5 0.5 scale -90 rotate -2384 0 translate >> setuserparams"
-f MyEps.EPS
************************End MyCommand2.CMD*************************
Not too bad performance-wise for the B&W to tiffg4 but when converting
colour PDFs to EPS the file size blows out to 100's MB resulting in a
huge PXL file.
Is there a way to scale the PDFs directly using the -c switch of
GhostScript ? I have tried many permutations (excpt the right one) but
it appears GS doesn't want to/can't scale a PDF using the above
operators. I can't use fit to page methods as sometimes the scale
needs to accurately set.
Any help would be appreciated.
Try
-c "<</BeginPage{0.5 0.5 scale -90 rotate -2384 0 translate}>> setpagedevice"
instead.
Helge
--
Helge Blischke
Softwareentwicklung
H.Blisc...@xxxxxxxx Hide quoted text -
- Show quoted text -
Thanks for the reply. This scales, rotates and shifts the image but
still puts it on the original size page. The A1 (594 x 841mm) PDF has
all the image data scaled put the resultant tiff is still 841 x 594mm.
Is there a way to scale the target page size as well ?
Thanks again...
Roger, over and out.
.
- Follow-Ups:
- Re: Using Ghostscript to Scale PDF Files
- From: Allan Adler
- Re: Using Ghostscript to Scale PDF Files
- References:
- Using Ghostscript to Scale PDF Files
- From: ReproRog
- Re: Using Ghostscript to Scale PDF Files
- From: Helge Blischke
- Using Ghostscript to Scale PDF Files
- Prev by Date: Re: Distiller: resampling to 1200 (or so) dpi
- Next by Date: Re: Distiller: resampling to 1200 (or so) dpi
- Previous by thread: Re: Using Ghostscript to Scale PDF Files
- Next by thread: Re: Using Ghostscript to Scale PDF Files
- Index(es):
Relevant Pages
|