PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sun Apr 28, 2024 8:37 am

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: Mon Nov 02, 2009 11:40 am 
Offline

Joined: Mon Nov 02, 2009 9:59 am
Posts: 2
Is it possible in MigraDoc to define a few pages with different sizes and then automatically fill them up with a piece of text?

For instance:
1) I defined a priori a document with three pages with the following sizes A3, A4, A5
2) I've got a large, continous piece of text
3) I want to combine 1) and 2) so text flows naturally from the first page (A3) through the next page (A4) and to the last page (A5)

Is this possible? Any workarounds?

Many thanks,
Karol


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 02, 2009 1:03 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3096
Location: Cologne, Germany
This is not possible with MigraDoc.

You have to start a new session to change the page size.
Text won't flow accross sessions.

Workarounds?
You can create three A3 pages (or three A4 pages) using MigraDoc and later use PDFsharp to create a document with A3, A4, A5. Font size on A4 will be 71% of the A3 font size, font size on A5 will be 50% of the A3 font size.

What do you need exactly?

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 02, 2009 1:43 pm 
Offline

Joined: Mon Nov 02, 2009 9:59 am
Posts: 2
Ahh, thank you Thomas - good idea, I'll give it a try. The only problem is that my "page" heights are also different, so they do not have exactly the same shape which I could scale up or down.

I'm using MigraDoc to create reports with multiple columns (usually three). I created a small "pages" which are projected onto PDF page to form columns. And everything would be fine, but the problem is that my first page contains a map (first half page), and three columns (second half page) and consecutive pages don't have the map, hence they contains three columns which occupy the whole page height.

So I've got the following situation

First page

xxxxxxxxxxx
xx Map xxxx
xxxxxxxxxxx

1 2 3
1 2 3
1 2 3

Second page (and other pages)

1 2 3
1 2 3
1 2 3
1 2 3
1 2 3
1 2 3
1 2 3

As you can see all columns (i.e. MigraDoc pages) on a single page are the same (1=2=3) but they differ between pages.
Everything worked really well with the single page - but with multiple pages I'm having trouble to accomodate different column(page) heights.

The content is relatively simple I can try to manually split text using trial-and-error aproach (prepare document multiple times, see when particular block of text ends in relation to the page count, etc.). I'm not sure about the performance but this is my only idea atm.

Any more ideas, tips, comments or workarounds are much appreciated.


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: No registered users and 349 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