Knowledgebase: General
Change paper size or orientation from command line
Posted by Craig Lebakken on 27 July 2007 02:10 PM
Question:
Is it possible to change the Win2PDF paper size or orientation from a command prompt?

Answer:
It isn't possible to set standard Windows settings such as paper size or orientation using the registry, but you can change these settings using a command line tool called "setprinter.exe" available in the Microsoft Windows Server 2003 Resource Kit Tools available at:

http://www.microsoft.com/downloads/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en

The following command can be used to change the paper size for the current user:

setprinter.exe "Win2PDF" 9 "pdevmode=dmFormName=A4"

You can change the "dmFormName=A4" to any paper size supported by Win2PDF.

The following command can be used to change the orientation for the current user to landscape:

setprinter.exe "Win2PDF" 9 "pdevmode=dmOrientation=2"
(7 vote(s))
Helpful
Not helpful

Comments (0)

Copyright 2000-2018 © Dane Prairie Systems LLC. All Rights Reserved. About Us | Privacy Policy | PDF Blog | Site Map