Last post May 17, 2010 05:59 AM by sensy
Apr 28, 2010 04:48 AM|sensy|LINK
What is the best way to send data from a database to a pdf writer?
database -> c# object -> xml + xslt ->pdf writer
database ->c# object ->html -> pdf writer
I dont do database -> xml as business logic is need on the data.
Later I also would like to use this principle for sending data to a printer.
Apr 28, 2010 07:59 AM|mkchourasia|LINK
database -> c# object -> XML Serialization ->pdf writer
Create PDF Files in C#
Apr 28, 2010 03:33 PM|atconway|LINK
The best way may depend on the interface or API exposed by the PDFWriter you are using. I recommend iTextSharp as it is free and there are a bunch of examples on how to program against it in C#:
Obviously the Database -> C# Object is great, but you may be able to port the data within the object directly to the writer without any further translation. It really depends on the tool you are using.
May 10, 2010 05:34 AM|Pebble94464|LINK
As you're planning to send output to a printer or PDF file, you might find it convenient to layout pages using System.Drawing or XAML.
The System.Drawing code of a PrintDocument can be reused to generate a PDF document with ABCpdf.NET from webSupergoo. See the
System.Drawing example for more details.
ABCpdf also supports Windows Presentation Foundation (WPF), the graphics sub-system developed for .NET 3.0. Define your page layout using Extensible Application Markup Language (XAML) and then send it to your printer with the PrintDialog.PrintVisual method.
WPF Table example shows how to take WPF based content and turn in into a PDF.
May 17, 2010 05:59 AM|sensy|LINK
Thnx for your help.
I conclude; the model follows the way the pdf/printer tool works.