Jump to content

Change Deafult printer settings


rscl
 Share

Recommended Posts

Hi,

Is there any way to change the default printer's PAPER SIZE & ORIENTATION settings from default->Specific & Specific->default ??

Thx for any ideas/pointers.

Best regards,

Sans

PS: I mean via an AutoIt script!

Edited by rscl
Link to comment
Share on other sites

I usually do stuff like this by sending keyboard commands to the printers popup dialog window with send or command click.

most printers have different setting for this so you will have to experiment with your settings to come up with a script that works for your printer.

in your case 2 scripts that start with something like:

Send("^p")

which opens the print dialog from most programs.

and then one that sends the command for portrait, and one with commands for landscape.

so you can just click whichever one you need...

hope this helps.

Good Luck!

Bill

Link to comment
Share on other sites

I usually do stuff like this by sending keyboard commands to the printers popup dialog window with send or command click.

most printers have different setting for this so you will have to experiment with your settings to come up with a script that works for your printer.

in your case 2 scripts that start with something like:

Send("^p")

which opens the print dialog from most programs.

and then one that sends the command for portrait, and one with commands for landscape.

so you can just click whichever one you need...

hope this helps.

Good Luck!

Bill

you could also use printui.dll (google for examples)
Link to comment
Share on other sites

  • 1 month later...

you find the document settings in the registry:

RegRead("HKCU\Printers\DevModePerUser",$sPrinter)

it's a binary string and depends on the printer, so it is not possible to decrypt it. but by changing the settings and reading the reg string you can detect the needed setting and regwrite it. you can save the default setting and restore it afterwards.

cheers j.

Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...