PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sat Apr 27, 2024 9:49 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Tue Jul 21, 2009 6:48 pm 
Offline

Joined: Tue Jul 21, 2009 6:37 pm
Posts: 12
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.


Top
 Profile  
Reply with quote  
PostPosted: Wed Jul 22, 2009 11:42 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3096
Location: Cologne, Germany
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.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Wed Jul 22, 2009 12:05 pm 
Offline

Joined: Tue Jul 21, 2009 6:37 pm
Posts: 12
What is the best way to learn how to use MigraDoc? Is there a user guide or manual?


Top
 Profile  
Reply with quote  
PostPosted: Wed Jul 22, 2009 12:38 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3096
Location: Cologne, Germany
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 ...

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Tue Jul 28, 2009 9:23 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3096
Location: Cologne, Germany
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();

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 392 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group