By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,730 Members | 1,739 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,730 IT Pros & Developers. It's quick & easy.

Printing HTML and RTF documents with custom headers

P: 1
I need to provide printing capability in a C# desktop application that I am developing
The documents that need to be printed can be in Rich Text Format (RTF) or HTML. Custom application specific headers are to be added in the print out.

The System.Drawing.Printing namespace .Net provides objects and dialogs to take care of basic print tasks. But there is no native support of printing RTF and HTML formats.
One would have to practically write a rendering engine that can parse these formats and write it out on the print graphics object.
Rich text box (;en-us;812425) and web browser control can be used for printing these formats, but cannot be used in my case because of custom headers that I want to print. How would I add headers (and footer + page number) on each page if I am using rich text box control.
Another obstacle in using webbrowser control for printing is that it does not expose any properties or objects so that the user selected print settings can be accessed. These setting are a must for me as applicaiton has to support audit logging of print events as regulatory requirement. The name of the printer is part of the print audit record.

Suggestion required regarding:
Any open source C# print libraries that can be used for printing RTF, HTML
Any good propriety C# print libraries that can be used for printing RTF, HTML
Any hope in WPF. The application in on .net 3.0.
Any other suggestions for printing RTF and HTML documents

Are there any C# printing gurus out there who can help??

Thanks and regards,
Apr 1 '08 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.