I need to write a PDF file from my WPF app.
I’ve seen some 3rd party libraries to create PDF files, but I couldn’t find any that would allow me to write boxes, or any shape for the matter.
Do I have to use some 2D library from .NET or is there any PDF library that provides that type of work?
This is what I need to draw:
I’ll have a list of objects List<ObjX> list; that I’ll use to fill each box.
Think of it as a Personal Data list of all employees, for instance.
____________________________________
{header_img}
| Name: {name} | Surname: {surname}|
| Address : {address} | City: {cit}|
____________________________________
It’s a very poor drawing, what I’ll do is a bit more elaborated, including even images.
You probably want iTextSharp
You can find lots of help on how to use it by searching StackOverflow. 🙂
This is an answer to drawing a rectangle: Draw a rectangle in an iText pdf
Edit
Also, a search on “drawing shapes iTextSharp” gave me this link which looks quite detailed. http://www.mikesdotnetting.com/Article/88/iTextSharp-Drawing-shapes-and-Graphics
You will need to watch out for differences in version, since 1.4 and 1.5 are quite different.