For Programmers: Free Programming Magazines  


Home > Archive > PostScript > September 2007 > ps2pdf.bat Options - setting the paper size









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author ps2pdf.bat Options - setting the paper size
LRI

2006-01-23, 7:04 pm

When I pass a 22x17 inch *.ps file to ps2pdf, it puts it on an A-sheet. If
I open this PostScript file in GhostView and look under the Media menu it
says the papersize is "User Defined".

8.5x11 and 17x11 page sizes work fine, but I need to be able to set the page
size to 22x17, 34x22 and 44x34 inches. How do I do that?


Dirk Krause

2006-01-24, 3:57 am

LRI schrieb:
> When I pass a 22x17 inch *.ps file to ps2pdf, it puts it on an A-sheet. If
> I open this PostScript file in GhostView and look under the Media menu it
> says the papersize is "User Defined".
>
> 8.5x11 and 17x11 page sizes work fine, but I need to be able to set the page
> size to 22x17, 34x22 and 44x34 inches. How do I do that?
>
>

Hello,
try to add

<< /PageSize [1584 1224] >> setpagedevice

before the first drawing operation in the PS file
(for 22x17). Calculate the numbers by
inches*72.
Hope this helps,

Dirk

--
Dipl.-Ing. Dirk Krause
http://www.fh-schmalkalden.de/url.p...elect_wert/3023
Please use the web form in the line above to establish personal contact.
Do not use the e-mail address shown in the header lines, mails to this
address go into the electronic trash can. Thanks.
LRI

2006-01-24, 7:56 am

Dirk,

There is that command already in the .PS file (see below for copy portion).
Anyways, i don't want to have to open every PS file and add stuff to it. I
want to be able to produce PDF files in a batch mode.

Does anyone know how to get this working properly with large paper sizes?

========================================

%%BeginFeature: *PageSize AnsiC
/HPDict /ProcSet findresource /SetMargins get [ 0 0 1 0 ] exch exec
<</PageSize[1224 1585]/ImagingBBox null>>setpagedevice
%%EndFeature
========================================



"Dirk Krause" <devnull@fh-schmalkalden.de> wrote in message
news:dr4lcm$lb7$1@tigger.scc.uni-weimar.de...
> LRI schrieb:
> Hello,
> try to add
>
> << /PageSize [1584 1224] >> setpagedevice
>
> before the first drawing operation in the PS file
> (for 22x17). Calculate the numbers by
> inches*72.
> Hope this helps,
>
> Dirk
>
> --
> Dipl.-Ing. Dirk Krause
> http://www.fh-schmalkalden.de/url.p...elect_wert/3023
> Please use the web form in the line above to establish personal contact.
> Do not use the e-mail address shown in the header lines, mails to this
> address go into the electronic trash can. Thanks.



LRI

2006-01-24, 7:02 pm

I tried the following, with no success. Tells me the paper size is unknown.


C:\Program Files\Ghost Script\gs8.50\lib>ps2pdf.bat c:\b.ps c:\b.pdf
%%[ ProductName: AFPL Ghostscript ]%%
%%[Page: 1]%%
%%[LastPage]%%

C:\Program Files\Ghost Script\gs8.50\lib>ps2pdf.bat -sPAPERSIZE=letter
c:\b.ps c:\b.pdf
AFPL Ghostscript 8.50 (2004-12-10)
Copyright (C) 2004 artofcode LLC, Benicia, CA. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Unknown paper size: ().
Unrecoverable error: stackunderflow in dup

C:\Program Files\Ghost Script\gs8.50\lib>


Tom

2006-02-10, 7:57 am

Hi!

LRI schrieb:
>
> C:\Program Files\Ghost Script\gs8.50\lib>ps2pdf.bat -sPAPERSIZE=letter
> c:\b.ps c:\b.pdf


Replace the '=' by a '#':

>ps2pdf.bat -sPAPERSIZE#letter c:\b.ps c:\b.pdf


Cf. Use.htm of the GhostScript documentation, section "MS Windows".
Also notice that you have to specify the output file (c:\b.pdf),
otherwise c:\b.ps would be overwritten.

ibbuntu

2007-09-11, 9:20 am

quote:
Originally posted by Tom
Hi!

LRI schrieb:
>
> C:\Program Files\Ghost Script\gs8.50\lib>ps2pdf.bat -sPAPERSIZE=letter
> c:\b.ps c:\b.pdf


Replace the '=' by a '#':

>ps2pdf.bat -sPAPERSIZE#letter c:\b.ps c:\b.pdf


Cf. Use.htm of the GhostScript documentation, section "MS Windows".
Also notice that you have to specify the output file (c:\b.pdf),
otherwise c:\b.ps would be overwritten.



I've been looking all over for a solution to this problem.

Thanks!
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com