Change paper size or orientation from command line
Posted by Craig Lebakken on 27 July 2007 02:10 PM
Is it possible to change the Win2PDF paper size or orientation from a command prompt?
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:
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"