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


Groups > comp.lang.postscript > #761

Re: Resize A4 to SRA4 with Ghostscript

From Helge Blischke <h.blischke@acm.org>
Newsgroups comp.lang.postscript
Subject Re: Resize A4 to SRA4 with Ghostscript
Followup-To comp.lang.postscript
Date 2012-06-25 13:41 +0200
Message-ID <a4r12mFscsU1@mid.individual.net> (permalink)
References <cfde15d8-6d0e-417a-9fcb-5a278df608dd@d17g2000vbv.googlegroups.com>

Followups directed to: comp.lang.postscript

Show all headers | View raw


Philippe Lang wrote:

> Hi,
> 
> I'm trying to use Ghostscript (v. 9.0.5) in order to resize A4
> documents to the slightly bigger SRA4 format, used in the printing
> industry.
> 
> The Ghostscript call ist the following:
> 
> gs -dPDFSETTINGS=/default -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite
> -sOutputFile=output_file.pdf -dDEVICEWIDTHPOINTS=638 -
> dDEVICEHEIGHTPOINTS=907
> -dFIXEDMEDIA input_file.pdf
> 
> It works for some of the files I've been testing, but fails for
> others: document size remains A4, no error, no warning.
> 
> One example of a file that fails is here:
> http://www.filejumbo.com/Download/9BA3BD62CEAB8F0E
> 
> Am I doing anything wrong or is that a bug in Ghostscript? Are there
> other tools that would allow me to do this maybe?
> 
> Thanks,
> 
> Philippe

As Ghostscript does not fully implement the /Policies rules as described in 
the PLRM, your only chance is to intercept some of Ghostscript's pdf 
rendering operators (search around pdfshowpage in pdf_main.ps) and program 
the centering by yourself.

Helge

PS: Perhaps ken would know an eaiser way to do it?

Back to comp.lang.postscript | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Resize A4 to SRA4 with Ghostscript Philippe Lang <philippe.lang72@gmail.com> - 2012-06-25 00:46 -0700
  Re: Resize A4 to SRA4 with Ghostscript Helge Blischke <h.blischke@acm.org> - 2012-06-25 13:41 +0200
    Re: Resize A4 to SRA4 with Ghostscript ken <ken@spamcop.net> - 2012-06-25 16:42 +0100

csiph-web