Re: Using Ghostscript to Scale PDF Files
- From: Helge Blischke <h.blischke@xxxxxx>
- Date: Sat, 08 Dec 2007 16:45:49 +0100
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.Blischke@xxxxxxx
.
- Follow-Ups:
- Re: Using Ghostscript to Scale PDF Files
- From: ReproRog
- Re: Using Ghostscript to Scale PDF Files
- References:
- Using Ghostscript to Scale PDF Files
- From: ReproRog
- Using Ghostscript to Scale PDF Files
- Prev by Date: Re: Ghostscript 8.61: Letter "l" deformed?
- Next by Date: Re: Distiller: resampling to 1200 (or so) dpi
- Previous by thread: Using Ghostscript to Scale PDF Files
- Next by thread: Re: Using Ghostscript to Scale PDF Files
- Index(es):
Relevant Pages
|