Bug 691618 - ps2pdf with the option -sPAPERSIZE=a2 does not work
Summary: ps2pdf with the option -sPAPERSIZE=a2 does not work
Status: RESOLVED WORKSFORME
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Writer (show other bugs)
Version: 8.71
Hardware: PC Windows XP
: P4 normal
Assignee: Ken Sharp
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-16 12:59 UTC by peter.wolfsteiner
Modified: 2010-09-16 16:59 UTC (History)
1 user (show)

See Also:
Customer:
Word Size: ---


Attachments
this files does not work with: ps2pdf -sPAPERSIZE=a4 cpsd.ps (6.95 MB, application/postscript)
2010-09-16 16:01 UTC, peter.wolfsteiner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description peter.wolfsteiner 2010-09-16 12:59:08 UTC
i created a ps-file with Matlab with the paper-format A2, in ghostview it looks fine!

the conversion to pdf with

ps2pdf -sPAPERSIZE=a2 file.ps

does not work (error message: 'Unknown paper size: ().'), without the option -sPAPERSIZE=a2 i get only a part of the a2-picture on the a4 output!
Comment 1 Ken Sharp 2010-09-16 13:29:01 UTC
(In reply to comment #0)
> i created a ps-file with Matlab with the paper-format A2, in ghostview it looks
> fine!
> 
> the conversion to pdf with
> 
> ps2pdf -sPAPERSIZE=a2 file.ps
> 
> does not work (error message: 'Unknown paper size: ().'), without the option
> -sPAPERSIZE=a2 i get only a part of the a2-picture on the a4 output!

Please supply an example file which exhibits the problem.
Comment 2 peter.wolfsteiner 2010-09-16 16:01:30 UTC
Created attachment 6730 [details]
this files does not work with: ps2pdf -sPAPERSIZE=a4 cpsd.ps

this files does not work with: ps2pdf -sPAPERSIZE=a4 cpsd.ps
Comment 3 Alex Cherepanov 2010-09-16 16:59:20 UTC
Windows command line interpreter doesn't accept '=' in the command
line arguments. Use '#' instead. 

Because of the limitations of the Windows command line interpreter,
optional arguments are not compatible with the one-argument call.

In short, use:
ps2pdf -sPAPERSIZE#a2 file.ps file.pdf

Or use Ghostscript directly. No '#' quirk needed.
gswin32c -sPAPERSIZE=a2 -sDEVICE=pdfwrite -o file.pdf -c .setpdfwrite -f file.ps