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


Groups > comp.lang.postscript > #760 > unrolled thread

Resize A4 to SRA4 with Ghostscript

Started byPhilippe Lang <philippe.lang72@gmail.com>
First post2012-06-25 00:46 -0700
Last post2012-06-25 16:42 +0100
Articles 3 — 3 participants

Back to article view | Back to comp.lang.postscript


Contents

  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

#760 — Resize A4 to SRA4 with Ghostscript

FromPhilippe Lang <philippe.lang72@gmail.com>
Date2012-06-25 00:46 -0700
SubjectResize A4 to SRA4 with Ghostscript
Message-ID<cfde15d8-6d0e-417a-9fcb-5a278df608dd@d17g2000vbv.googlegroups.com>
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

[toc] | [next] | [standalone]


#761

FromHelge Blischke <h.blischke@acm.org>
Date2012-06-25 13:41 +0200
Message-ID<a4r12mFscsU1@mid.individual.net>
In reply to#760
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?

[toc] | [prev] | [next] | [standalone]


#766

Fromken <ken@spamcop.net>
Date2012-06-25 16:42 +0100
Message-ID<MPG.2a52975442e4850a98988b@usenet.plus.net>
In reply to#761
In article <a4r12mFscsU1@mid.individual.net>, h.blischke@acm.org says...

> 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?

The actual issue is tracked here :

http://bugs.ghostscript.com/show_bug.cgi?id=693152

Its the presence of the CropBox which does it, not any Policies.


				Ken

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.postscript


csiph-web