473,394 Members | 1,702 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Printing rendered HTML in .net

right now, for printing HTML in .net
I use a AxBrowser and I do
ExecWB(SHDocVw.OLECMDID.OLECMDID_PRINT,
SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DONTPROMPTUSER )

I then call Application.DoEvents() in a loop for 1 min and hope all of it
was spooled. Unfortunately, I'd say for every 600 times I use this method, 1
print job goes bad, it was either not printed or in 1 case, part of the
rendered HTML was printed. The HTML data, when spooled, is always about
100~150kbytes, and when I tested it, it would usually spool in less than 15
seconds, so 1min should me more than enough.

Unfortunately, my boss said he wants everything to print, so I ask, are
there any components in .net that will render and print the rendered HTML?
Does anyone know of any alternatives.

ExecWB() returns immediately but it doesn't notify me when the data has been
spooled. Is there anyway I can be notified when the data has been spooled?

Thx in advance.
Nov 15 '05 #1
1 2038
Ok, I think I found a workable solution, listen for the
AxWebBrowser.PrintTemplateTeardown event!
"Hasani" <bi*******@hax0r.dyndns.org> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
right now, for printing HTML in .net
I use a AxBrowser and I do
ExecWB(SHDocVw.OLECMDID.OLECMDID_PRINT,
SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DONTPROMPTUSER )

I then call Application.DoEvents() in a loop for 1 min and hope all of it
was spooled. Unfortunately, I'd say for every 600 times I use this method, 1 print job goes bad, it was either not printed or in 1 case, part of the
rendered HTML was printed. The HTML data, when spooled, is always about
100~150kbytes, and when I tested it, it would usually spool in less than 15 seconds, so 1min should me more than enough.

Unfortunately, my boss said he wants everything to print, so I ask, are
there any components in .net that will render and print the rendered HTML?
Does anyone know of any alternatives.

ExecWB() returns immediately but it doesn't notify me when the data has been spooled. Is there anyway I can be notified when the data has been spooled?

Thx in advance.

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Tim | last post by:
Hi, I am creating my own method for printing. I am using PrintDocument and cycling through the data and creating new pages as neccessary. My question is, how can I know that total number of...
3
by: Ahmad Abu-Raddad | last post by:
Hey Guys, Does anyone knows of a way to print HTML source directly to the printer (Server Side)?. I tried the PrintDocument class and the e.Graphics.DrawString and e.Graphics.DrawImage() but...
5
by: I'm Home | last post by:
I've read a lot of suggestions including the "javascript:printWindow()" command ... what I want ... the entire datagrid in printed form using my css style. What I get the page displayed on my...
3
by: larry mckay | last post by:
I'm trying to programatically print the content that is rendered in an internet explorer control. if do webbrowser.navigate ("http://www.yahoo.com") the content of the webpage appears in the...
0
by: Xdev | last post by:
I've created a ASP.NET utility which output xml-based reports as HTML using an xslt transform. The ports show up fine in the web browser, but I would like to print the rendered html (not the...
6
by: Chris Dunaway | last post by:
The method for printing documents in .Net can be confusing, especially for newer users. I would like to create a way to simplify this process. My idea would be implemented using a PrintDocument...
4
by: Lucas Ponzo | last post by:
Hi All, I have an ASP.NET 2.0 app. The users access the pages, uniquely via pocket pc ... I need to print a page. But I need that the page print on a printer installed on the web server...
1
by: dave8421 | last post by:
Hi, I'm trying to make sense of the definition for "Rendered Content" in current CR for CSS 2.1 Is rendered content what is displayed on the particular media or device? from the...
2
by: =?Utf-8?B?Umlja1NlYW4=?= | last post by:
I have a long form within a panel which exceeds the maximum height of 876. I use the following code to print the form but it prints only the portion of the form that is displayed on the screen (max...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.