Jump to content

Command line printing


myspacee
 Share

Recommended Posts

Hello,

in these day i try to find a way to print .pdf files in command line.

Adobe allows print via command line ( /p switch) but have strange behavior.

Adobe program remains open after print, and batches don't go on until you quit it mannually.

So i search another solution, without luck.

If you drag & drop a file over your printer, windows put file in spooler and print.

Is there any way to do this, using Autoit ?

thank you for any info,

m.

Link to comment
Share on other sites

Hi Yes it cna be done. Have a look at the following links

http://technet.microsoft.com/en-us/library/cc772773(WS.10).aspx

http://technet.microsoft.com/en-us/library/cc782930(WS.10).aspx

What issues are you getting with using the command line in adobe? i know you said it doesnt close afterwards but you can use the proccess close command to sort that.

Drunken Frat-Boy Monkey Garbage

Link to comment
Share on other sites

thank you for reply,

already know MS resources...

Adobe behavior is very strange :

- if you run from command line [adobe.exe /p /h yourdoc.pdf] pdf is printed fine and command line is disposable

- if you run from batch same command [adobe.exe /p /h yourdoc.pdf] pdf is printed fine but command line is not disposable

(batch wait until you mannually close Adobe)

can't figure out this strange issue.

Very strange...

m.

Link to comment
Share on other sites

try to use the start-command in your batch file.

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Link to comment
Share on other sites

If you want to close Reader after printing, the best way to print is using DDE.

All what you want and a discussion you can find here:

http://www.autoitscript.com/forum/index.php?showtopic=107961&st=0&p=826314&hl=DDE%20Reinhard&fromsearch=1&#entry826314

Good luck, Reinhard

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