468,113 Members | 2,139 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Printing HTML and RTF documents with custom headers

Requirement:
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.

Problem:
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,
Nikhilesh
Apr 1 '08 #1
0 1846

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
3 posts views Thread by didacticone | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.