Printing from command line

 

Description

In a batch process, one can print and convert documents through the command line printing using the Black Ice printer driver. Printing to the Black Ice printer driver in the command line, requires the configuration of the printing application. Every printing application requires different command line parameter(s). Black Ice software illustrates the command line printing for the most popular applications.

 

Printingfrom command line

Since every printing application requires command line parameters for printing, Black Ice software illustrates the command line printing for the most popular applications. If your  application is not listed below, one can get this information from the Black Ice printer driver ‘Printer properties’ (on Windows  7) ‘Properties’ (on XP).

You can find the print parameters for the Black Ice Printer driver:

<printername> from ‘General’ tab

<portname> from ‘Ports’ tab

<drivername> from ‘Advanced’ tab

Example printing from wordpad:

Description: Description: C:\Documents and Settings\kmihaly\Desktop\Stuff\wordpad_pritn.JPG

 

 

General examples for command line printing for popular applications.

Wordpad

Command:

Write.exe /PT <filename> <printername>

Notepad

The printer driver must be the default printer.

Command:

Notepad /P <filename>

 

Adobe Reader (not recomended)

AcroRd32.exe

Command:

<path of Adobe Reader>\AcroRd32.exe /t <filename> <printername> <drivername> <portname>

Microsoft Office Word 2007

Command:

"C:\Program Files\Microsoft Office\Office\WINWORD.EXE" <filename> /q /n /mFilePrintDefault /mFileExit

In this case the printer driver must be the default printer. More complicated macro could be written and used with the parameter:

/m<macroname>

Not to display the splash screen

/q

Not to load a new default document

/n

 

 

Using batch file

One can use a batch file to print documents with the Black Ice Printer Driver. The Converted documents can be found in the output directory set in the printer driver, please see the “Printing preference” and the “Filename Generation” tab of the printer driver. Printing from a shared folder on a network is also available.

One can find examples here:

Wordpad:

Write.exe /pt "c:\Documents and Settings\Administrator\Desktop\ TestPrint.txt" "Black Ice ColorPlus"

Notepad

Notepad /p "c:\Documents and Settings\Administrator\Desktop\TestPrint.txt"

Adobe Reader (not recomended)

"c:\Program Files\Adobe\Reader 10.0\Reader\AcroRd32.exe" /t "c:\Documents and Settings\Administrator\Desktop\TestPDF.pdf" "Black Ice ColorPlus" "Black Ice ColorPlus Driver" "Black Ice Port"

Microsoft Office Word 2007

"c:\Program Files\Microsoft Office\OFFICE11\WINWORD.EXE" c:\Documents and Settings\Administrator\Desktop\TestDoc.docx " /q /n /mFilePrintDefault /mFileExit