PTC MKS Toolkit Knowledge Base

Section:IO
Product:MKS Toolkit (All)
Version:
OS:All
Keywords:print, lpr
Category:Utilities/Knowledge Base


How do I print to a local or network printer from within an MKS Toolkit shell?


At this time the MKS Toolkit shells do not have any features of their own for printing. Here are some techniques provided by Windows which can be used in a Command (DOS) shell or an MKS Toolkit shell.

You can print to a local printer (connected to your parallel port) by redirecting to the device "prn".

    cat file > prn

On Windows 95/98/ME you can also "capture" a network printer so that files directed to the "prn" device go to it. This is done through the add printer shortcut under Start -> Settings -> Printers.

On more advanced Windows systems you can use the lpr command in the winnt\system32 directory (assuming the TCP printing service is installed) to send files to a network print queue. The lpq command will tell you the status of a print queue (Note: not all Windows installations will have these commands).

You may also be able to copy or move a file directly into a network printer's queue through a UNC name or mapped drive.

    cp file //PRINTHOST/printer1

These features and utilities are not supported by MKS technical support.