470,574 Members | 1,115 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,574 developers. It's quick & easy.

Printing HTML and RTF documents with custom headers

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 ( http://support.microsoft.com/default.aspx?scid=kb;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
0 1996

Post your reply

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

Similar topics

2 posts views Thread by Kevin Thorpe | last post: by
16 posts views Thread by gb | last post: by
2 posts views Thread by ACaunter | last post: by
2 posts views Thread by Jurjen de Groot | last post: by
12 posts views Thread by Alex Clark | last post: by
1 post views Thread by Laurent Navarro | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.