PDFsharp & MigraDoc Foundation

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

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Thu Jul 23, 2009 2:39 pm 
Offline

Joined: Tue Jul 21, 2009 6:37 pm
Posts: 12
I'd like to get a Table of Contents to flow in 2 columns ... listing links down left column first then continuing the list down the right column before going on to the next page. Something like this:

First topic ........ 1 TwentyFirst topic ....... 102
Second topic ..... 3 TwentySecond topic ... 108
Third topic ........ 5 TwentyThird topic ....... 117
Fourth topic ....... 7 TwentyFourth topic ..... 119
Fifth topic .......... 9 TwentyFifth topic ........ 130
etc...
Twentieth topic ...98

--- end of page here --


Thirtieth topc ... 215 Fortifirst topc ........... 315
Thirtifirst topic .. 220 Fortysecond topic ..... 320
etc


I currrently have a STYLE defined that will display the table of contents in a single narrow column

// Create a new style called TOC based on style Normal
style = document.Styles.AddStyle("TOC2", "Normal");
style.Font.Name = "Arial Narrow";
style.Font.Size = 6;
style.ParagraphFormat.AddTabStop("2cm", TabAlignment.Left, TabLeader.Dots);
style.ParagraphFormat.AddTabStop("8cm", TabAlignment.Right);
style.ParagraphFormat.Font.Color = Colors.Blue;


Is there a way to flow the paragraph or is there a different approach?

thanks.


Top
 Profile  
Reply with quote  
PostPosted: Thu Jul 23, 2009 4:06 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3096
Location: Cologne, Germany
I'd make a table with two columns and distribute the TOC entries between the columns.

You'll have to handle pagebreaks yourself in this approach (simple if all entries fit into 1 line each).

_________________
Regards
Thomas Hoevel
PDFsharp Team


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

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 405 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