Skip to main content
September 6, 2012
Question

why gswin32c does not give desired output with setpagedevice

  • September 6, 2012
  • 2 replies
  • 2399 views

hi..

am trying to set the page size of the document while printing using the following PostScript file

mark

/NoCancel      true

/OutputFile (%printer%Test)

/OutputDevice /mswinpr2

/UserSetting

<<

/DocumentName (Data)

>>

(mswinpr2) finddevice

putdeviceprops

<</PageSize[595 842]>>setpagedevice

setdevice

but it always give page as letter in output

please help me out in the process of printing a file to a desired page size with help of PostScript and gswin32c.exe

This topic has been closed for replies.

2 replies

Participating Frequently
September 6, 2012

Well, setpagedevice refers to the current device (which is a display device by default), and your call of the

setdevice operator, which makes the selected mswinpr2 the current device, is executed afterwards.

Exchange these lines:

<</PageSize[595 842]>>setpagedevice

setdevice

Helge

September 6, 2012

sir i have tried this also but it was also not working

sir have you tried to execute this .....what the output you was getting ...

and is there any way by which i can change the mswinpr2 print properties...??

Participating Frequently
September 6, 2012

From a strictly PostScript standpoint, the only part of this code you should need is the call to setpagedevice:

     << /PageSize [ 595 842 ] >> setpagedevice

Note this should precede any PostScript that draws on the page.

Are you writing your own PostScript or modifying existing code (driver output or some such)?

- John

-------

John Deubert

Acumen Training

PostScript & PDF consulting and training

www.acumentraining.com

September 6, 2012

actually i am trying to print a pdf file which is there in my C drive ie c:\data.pdf

so for that i am using that postscript file

and on command prompt i am using gswin32c.exe to execute that

commond line agrument are

>gswin32c.exe -dPrinted -dBATCH -dNOPAUSE -dNOSAER c:\data.ps c:\data.pdf

in which data.ps contain above code

and the output of above command is the print with letter page size no matter what size i am setting

please help me out sir!!