Tables and charts using PDFsharp [closed]
Asked Answered
M

2

13

I just started with a project that requires me to write to PDF file. After some googling I decided on using PDFsharp which looks simple enough, however I have a few questions regarding drawing tables and charts.

Is PDFsharp a good choice for writing PDF files that contain tables and charts? If no, can you recommend a better alternative? If yes, where could I find some good literature on the subject? A tutorial would be nice (doesn't have to be a sample project, just something I can use to familiarise myself with the library and its classes).

Can anyone tell me what MigraDoc is all about? I just took a glimpse and it seems perfect for what I need, however I would like some more information about it.

Miscreance answered 9/7, 2009 at 8:10 Comment(1)
D
31

PDFsharp is a "low level" PDF generator, while MigraDoc is a "high level" document generator that uses PDFsharp to create PDF files, but can also create e. g. RTF.

Visit the PDFsharp/MigraDoc Foundation Website for further information:
http://www.pdfsharp.net/

Dejesus answered 25/8, 2009 at 10:2 Comment(0)
T
4

If you dont want to use MigraDoc, you can use the gfx.Drawline() and draw the table yourself. I did it in one of my Projects. You can do it like that:

        gfx.DrawLine(pen, 45, 250, 45, 703);
        gfx.DrawLine(pen, 87, 250, 87, 703);
        gfx.DrawLine(pen, 150, 250, 150, 703);
        gfx.DrawLine(pen, 291, 250, 291, 703);
        gfx.DrawLine(pen, 381, 250, 381, 703);
        gfx.DrawLine(pen, 461, 250, 461, 703);
        gfx.DrawLine(pen, 571, 250, 571, 703);

Or you can use a for loop to do it like that and count the postion up.

Torrefy answered 16/7, 2014 at 11:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.