david.au said:
Ken
The commands were accepted (I used LPT3 to make the
batch file more widely compatible).
Tried it out, attempting to print a 3-page PDF document.
The printer spewed out about 50 pages of garbage - looks
like the file was treated as binary data rather than a PDF
file requiring Acrobat to print it.
Did you send the pdf file directly to the printer? No, you can never do
that. What you have to do is run Adobe Acrobat (or Adobe Reader) and print
the pdf file to a file . That printed-to-a file file (normally, but not
necessarily with a .PRN extension) is the only kind of file you can print
this way
Print to a file from Acrobat to print a .pdf file, from Word to print a .doc
file, from Exxcel to print an xls file, etc..Without first going through the
appropraite program, there's no way to print anything but a txt file.
Also note that to create the PRN file, you have to first define a "printer"
that's a print-to-file printer and install the driver for the actual printer
you're going to use.
Sorry, since you said "Using the GUI I can printer a file by copying it to a
printer," I had assumed that you understood this. You never explained why
you wanted to do it, and it may be possible that now that you understand
what you have to do, you may no longer want to do it.
Printing to a file isn't generally useful to most people, but I've used it
for example when every month someone was E-mailing me the output of a
program he was running. I needed a hard copy of his output for publication
in a newsletter, but I didn't have the application installed on my computer.
So I had him print it to a file, using the printer driver for *my* printer,
not his, and then E-mail me the resulting PRN file. I then was able to
simply copy it to LPT1 when it arrived here.
--
Ken Blake - Microsoft MVP Windows: Shell/User
Please reply to the newsgroup