PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Tue Jul 02, 2024 9:20 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Wed Apr 20, 2011 9:00 am 
Offline

Joined: Wed Apr 20, 2011 8:57 am
Posts: 2
Hello there,

Using Migradoc is it possible to insert a document section into a document at a position of my choosing? For example I have a PDF report that I wish to create a table of contents for, the only problem is that I do not know what the content of the report will be until after I have generated it. I was therefore wondering if I could create a table of contents and insert it at the front of the document after having created all the document sections?

Any help and advise is greatly appreciated.


Top
 Profile  
Reply with quote  
PostPosted: Wed Apr 20, 2011 10:22 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3101
Location: Cologne, Germany
Hi!

Add a section for the Table of Contents (TOC) and leave it empty (but store the object).

Add another section for the contents. Then add the contents to it.
You can add the references to the TOC after adding the contents. Add bookmarks to the contents that can be referenced by the TOC.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Wed Apr 20, 2011 11:40 am 
Offline

Joined: Wed Apr 20, 2011 8:57 am
Posts: 2
Thanks for the advice, thats fantastic.

Shall I just store the TOC as a section object and then add content to it afterwards? Does anyone have any examples of code that allows this?

Many Thanks


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

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 47 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:  
cron
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group