HTTPWebResponse and Printing

  • Thread starter Thread starter PetroMan
  • Start date Start date
P

PetroMan

I am using VB .Net with HTTPWebRequest/HTTPWebResponse to navigate a
web site and print invoices (not download them - their requirements,
not mine). The related web site, when printing an invoice, modifies the
current HTML that displays the invoice, creates a new window and does a
print.

The corresponding Java script is:

Var THEhtml = '<HTML> \n<HEAD>\n';

<<Massage THEhtml based on existing contents>>

var printMe =
window.open("","printIt","scrollbars,HEIGHT=399,WIDTH=799");
printMe .document.open();
printMe .document.write(THEhtml);
printMe .document.close();
printMe .print

Any suggestions on how to duplicate these procedures in VB to
facilitate a print with the correct appearance? The corresponding
HTTPWebResponse uses a TextReader to obtain the source HTML.

Thanks...

Denny
 
OK... So I found out that using ProcessStartInfo, the .verb of "print",
the .windowstyle of "hidden", a .filename (of a temporary file),
..UseShellExecute set to true and then doing a process.start will get
the contents printed.

However...now I'm in the often referenced trap of trying to prevent the
print dialog box from showing.

Any suggestions (more investigation on my part to follow)?

Thanks...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top