Printing a.gif from a Batch File

  • Thread starter Thread starter Steve Behman
  • Start date Start date
S

Steve Behman

I have a .gif file which, when "dragged", to a printer prints correctly as an
image.

When I attempt to get the same result from a batch file using:

"print /d:printername file."

I get garbage output. When I omit the printer name argument I get a dialog
asking several irrelevant things.

What I want to do is accomplish the same result as the drag operation did in
a batch file (i.e. the correct printing of the .gif file as the image it
represents).
 
I have a .gif file which, when "dragged", to a printer prints correctly as an
image.

When I attempt to get the same result from a batch file using:

"print /d:printername file."

I get garbage output. When I omit the printer name argument I get a dialog
asking several irrelevant things.

When you use Windows XP utilities through the WinXP OS,
devices like printers are managed by the WinXP OS. But
BATch files use DOS instead, i.e. use DOS utilities and
DOS functions like PRINT. In order to work on a device
(printer) DOS utilities would also require a DOS device
driver for a Windows printer. Without DOS printer drivers, you
can print from Windows only on a printer capable of
"emulating" DOS. (See the printer manual. Nowadays
only 4 or 10 per cent of new printers can emulate DOS.)
 
Don, thanks for the response but, I don't think you're correct.

Windows XP's "Command Window" is cmd.exe not command.com. cmd.exe is a pure
Windows XP executable.

It is also true that the most common language interpreted by printers is PCL
and virtually all device drivers translate the pages to be printed to PCL and
then send PCL to the printer.

My quandary is that the drag-and-drop method invokes identically the same
driver as does the "print" command but, obviously, in a different way because
a printer can have only one driver.

In my specific case, I have a printer which interprets both PCL and
PostScript -- in order to use both emulations I had to define two separate
printers, one using the PostScript driver the other using the PCL driver.
 
I have learned that the drag-and-drop method actually invokes mspaint.exe to
do the printing!

Unfortunately, I have not been able to discover which command line switches
are employed in this process.

Searching the Web I have found that there are at least two switches /P and
/PT however neither of the these produce the same result as does the
drag-and-drop.
 
Steve said:
I have learned that the drag-and-drop method actually invokes mspaint.exe to
do the printing!

Unfortunately, I have not been able to discover which command line switches
are employed in this process.

Searching the Web I have found that there are at least two switches /P and
/PT however neither of the these produce the same result as does the
drag-and-drop.

I haven't checked, but am wondering if any revealing commands would be
located using Regedit to search for gif and paint.
 
Back
Top