PDFsharp & MigraDoc Foundation
http://forum.pdfsharp.de/

data tables on pages and Table of Contents
http://forum.pdfsharp.de/viewtopic.php?f=2&t=796
Page 1 of 1

Author:  sbilo [ Tue Jul 21, 2009 6:48 pm ]
Post subject:  data tables on pages and Table of Contents

Beginner code sample. Need to get a series of datasets from a sql database and display the results in tables. Each result set's table should be on a separate page. Also need to have a Table of Contents which shows the page numbers for each of the detail tables. Is there sample code that would show me how to code this in VS2008 using C#?
Thanks.

Author:  Thomas Hoevel [ Wed Jul 22, 2009 11:42 am ]
Post subject:  Re: data tables on pages and Table of Contents

You can do all this with MigraDoc.
I'm afraid we don't have a single sample that shows all this.

You'll need AddHyperlink for the table of contents, AddPagebreak and AddTable for the tables.

Author:  sbilo [ Wed Jul 22, 2009 12:05 pm ]
Post subject:  Re: data tables on pages and Table of Contents

What is the best way to learn how to use MigraDoc? Is there a user guide or manual?

Author:  Thomas Hoevel [ Wed Jul 22, 2009 12:38 pm ]
Post subject:  Re: data tables on pages and Table of Contents

Helpfile is under construction.

Look at the samples, use Intellisense.

Just type "section.Add" and "paragraph.Add" in the Hello World sample (above "return document;") and you'll see what you can add.
The AddXXX routines return objects that provide methods for advanced features.
BTW: call AddBookmark to give each table a name. Use the name with AddHyperlink. You can call AddHyperlink to build the TOC before you call AddBookmark.
Click on the class name or method name and F12 takes you to the implementation in the source code.

With PDFsharp 1.3 (coming soon now) F1 will also work ...

Author:  Thomas Hoevel [ Tue Jul 28, 2009 9:23 am ]
Post subject:  Re: data tables on pages and Table of Contents

Thomas Hoevel wrote:
You can do all this with MigraDoc.
I'm afraid we don't have a single sample that shows all this.

I have to correct myself.

The DocumentViewer MigraDoc sample demonstrates Table of Contents and Tables in one document.
See File => Create Sample 2 in the program.
Or in the code look for:
Code:
Document document = SampleDocuments.CreateSample2();

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/