Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

why gswin32c does not give desired output with setpagedevice

Guest
Sep 05, 2012 Sep 05, 2012

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

TOPICS
Programming
2.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 05, 2012 Sep 05, 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Sep 05, 2012 Sep 05, 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!!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Sep 06, 2012 Sep 06, 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Sep 06, 2012 Sep 06, 2012
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines