Discussion:
Ghostscript command line switch for Shrink to fit Page Size in GSview
(too old to reply)
b***@ville.laval.qc.ca
2008-08-26 13:13:22 UTC
Permalink
I would like to scale a 36"x32.5" PDF to fit an 11x17 ( tabloid )
page. Additionally I would like to shift ( offset ) the output scaled
PDF. I can accomplish all of this in GSciew through the following
sequence of clicks : Media > 11x17, File > Convert > pdfwrite > Shrink
to fit Page Size, Properties > Page Offset X pts Y pts

This sequence of clicks yields the desired scaled ( from 36"x32.5" to
11"x17") and shifted (X, Y) PDF. How can I achieve the same thing with
a Ghostscript command? I have tried :

@echo off
REM Converts PDF to PDF. Useful for reducing bloated ESRI written PDFs
MD RePDF
FOR %%f IN (*.pdf) DO gswin32 -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -
sOUTPUTFILE=RePDF\"%%f" -dPDFSETTINGS=/prepress -dSubsetFonts=false -
dTextAlphaBits=4 -dGraphicsAlphaBits=4 -dDEVICEWIDTHPOINTS=1224 -
dDEVICEHEIGHTPOINTS=792 -dFIXEDMEDIA "%%f"

which yields an unscaled 11x17 PDF with the upper right portion of the
PDF cropped ( chopped ). Any insight would be greatly appreciated. A
google search tells me that psresize can resize a postscript file- can
it also perform a shift? Ideally I would prefer to perform my
conversion entirely within Ghostscript or alternatively with Acrobat
Professional, but any solution is welcome. Thanks!
ken
2008-08-26 15:21:28 UTC
Permalink
Post by b***@ville.laval.qc.ca
which yields an unscaled 11x17 PDF with the upper right portion of the
PDF cropped ( chopped ).
Sounds like your PageSize Policy is set to 5 or 6, try setting it to 3
or 4. 5 = nearest media do not adjust page, 5 = next largest media do
not adjust page.


Ken
b***@ville.laval.qc.ca
2008-08-26 19:50:31 UTC
Permalink
Post by ken
Post by b***@ville.laval.qc.ca
which yields an unscaled 11x17 PDF with the upper right portion of the
PDF cropped ( chopped ).
Sounds like your PageSize Policy is set to 5 or 6, try setting it to 3
or 4. 5 = nearest media do not adjust page, 5 = next largest media do
not adjust page.
                Ken
Please excuse my ignorance- where/how does one modify the PageSize
parameter? Cheers for the response!
ken
2008-08-27 07:14:27 UTC
Permalink
In article <92981fe4-257f-4b01-864e-
***@y38g2000hsy.googlegroups.com>, ***@ville.laval.qc.ca
says...
Post by b***@ville.laval.qc.ca
Post by ken
Sounds like your PageSize Policy is set to 5 or 6, try setting it to 3
or 4. 5 = nearest media do not adjust page, 5 = next largest media do
not adjust page.
                Ken
Please excuse my ignorance- where/how does one modify the PageSize
parameter? Cheers for the response!
In the PostScript job is one way. Failing that, send it to GS on the
command line:

-c "<< /Policies << /PageSize 3 >> >> setpagedevice"

Obviously if the job also contains a Policy, it will override this one.


You can also adjust the scale and position on the media, eg:

-c " 0.5 0.5 scale 100 100 translate"

This latter may not work if the job contains certain PostScript
operators.


Ken

Loading...