Jump to content
Sign in to follow this  
rscl

Change Deafult printer settings

Recommended Posts

rscl

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

Share this post


Link to post
Share on other sites
l3ill

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

Share this post


Link to post
Share on other sites
seandisanti

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)

Share this post


Link to post
Share on other sites
jennico

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

 

Share this post


Link to post
Share on other sites
LarryDalooza

I second this... rundll32 and printui.dll ... worth it's weight in gold... though, what does it weigh, really?

LAr.

you could also use printui.dll (google for examples)


f_mrcleansmalm_77ce002.jpgAutoIt has helped make me wealthy

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.