I am working in a desktop project in C# with .net. This project has a function that generates some information and i would like to print this generated info as a document (may be .doc, .pdf, etc). Summarizing, i need:
- Get the data generated by a function;
- Generate a document containing these information structured with title, texts and tables (things that every document have);
- Print it;
I thought generating an .html file (because it’s simple to generate this kind of file), but i couldn’t find a way to print it directly from my program.
Which extension of file would you recommend to insert this kind of information and print it directly from my program??
Thanks in advance.
Directly? Open printer port…
Or you can do it with framework classes:
How to: Print with a WebBrowser Control
http://msdn.microsoft.com/en-us/library/b0wes9a3.aspx