Printing an .htm files from ms-dos

  • Thread starter Thread starter bd95
  • Start date Start date
B

bd95

Hello everyone...

Someone had posted this a few years ago and there wasn't any responses
made to it.

"I'm trying to print a .htm document from a batch file in
MS-DOS to a network printer, I can get the document to
print but it is just printing the contents of the file
without any formatting, what I'd like to do is send the
file to be printed from the Windows spooler so that it
appears correctly from the printer, any ideas please????"

I currently am having the same issue and scoured the internet for 2
days with no solid finds. The issue is the file has table formatting
within it and when printed the text prints but the table layout is not
present. If anyone has any input on this it would be greatly
appreciated. Thanks
 
bd95,
"I'm trying to print a .htm document from a batch file in
MS-DOS to a network printer, I can get the document to
print but it is just printing the contents of the file
without any formatting, what I'd like to do is send the
file to be printed from the Windows spooler so that it
appears correctly from the printer, any ideas please????"

you need a program which will render the htm file into the GDI job for the
destination printer (like a web browser)

From the command prompt (or a batch file) you could run:
explorer myfile.htm
(try also iexplore.exe myfile.htm)
then you could use the File->Print internet explorer's menu item

If you're searching for an automated way, and you're familiar with Windows
programming, you may try the ShellExecute() function (or OLE automation) to
automatically call the Internet Explorer's printing features.

Kind regards,
Davide Guolo
aSwIt s.r.l.
--------------------------------------------------------------
Printfil - Windows Printing System for Applications
http://www.printfil.com
Odbc4All - Connection to ODBC Data Sources for any Application
http://www.aswit.com/odbc4all
--------------------------------------------------------------
 
Back
Top