HTML printing

krsh24

Active member
Joined
Sep 16, 2006
Messages
25
Programming Experience
3-5
Hi,

I have few HTML documents stored in database. The requirement is to read these HTML documents (say as string object) and print the HTML document similar to how the browsers print work. But the requirement is to execute the print silently without any print dialog popping up (like printer preferences) coz this will be a windows service. The target .NET framework is 1.1.

I tried this option.

VB.NET:
Dim objHTML As New HTMLDocumentClass
'etc etc			
objHTML.execCommand("print", true,flags)

on calling the execCommand pops up the print dialog. I tried setting the second parameter of the execCommand to false but that doesn seem to make any difference.

Are there any other ways where i can pass the "printer name" and other settings and it silently prints the HTML document.

Thank you
Krsh
 
Last edited by a moderator:
I think you either have to parse the HTML through a browser and process the page giving parameters to print... or you extract the data from database, create the file physically, use .NET PrintDocument and delete the file.
 
Well yes i could do that. But still using PrintDocument i would still end up seeing a printing status window. Is there any way i could do a silent print?

Thank You
Krsh
 
Back
Top