Q: How to create a Pie charts and Graphs using PdfNet SDK? Thanks and
Regards, Kiran Kumar K.V
A: There are couple of options:
- You can use low-level classes ElementBuilder & ElementWriter (as
shown in ElementBuilder sample - http://www.pdftron.com/pdfnet/samplecode.html#ElementBuilder).
Using these classes you would essentially need to draw the page
element by element – which is very powerful, but may be overkill in
case you have very basic layout requirements.
- Alternatively you can se high-level WPF API or Xaml along the lines
shown in Xaml2Pdf sample (http://www.pdftron.com/pdfnet/
samplecode.html#Xaml2Pdf). Besides using standard .NET graphics API to
create your own graphics you can also use any third party charting or
graphing controls. Then you can convert a FlowDocument, Canvas,
Control to PDF as shown in the sample. The resulting PDF graphics can
be placed on another page etc.