Bug 691618

Summary: ps2pdf with the option -sPAPERSIZE=a2 does not work
Product: Ghostscript Reporter: peter.wolfsteiner
Component: PDF WriterAssignee: Ken Sharp <ken.sharp>
Status: RESOLVED WORKSFORME    
Severity: normal CC: alex
Priority: P4    
Version: 8.71   
Hardware: PC   
OS: Windows XP   
Customer: Word Size: ---
Attachments: this files does not work with: ps2pdf -sPAPERSIZE=a4 cpsd.ps

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