PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Oct 31, 2024 10:51 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
 Post subject: automatic page breaks
PostPosted: Fri Sep 19, 2008 5:42 pm 
Offline

Joined: Fri Sep 19, 2008 5:38 pm
Posts: 1
I am looking to duplicate how programs, like Word, handle automatic page breaks. I have a string of unknown length and would like to generate a PDF of that text and have it automatically add page breaks to generate n pages of a fixed page size.

Any help would be most appreciated.

Thanks


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Sep 19, 2008 5:50 pm 
Offline

Joined: Fri Sep 05, 2008 4:05 pm
Posts: 5
I belive if you use MigraDoc API that comes with PdfSharp to construct you document then automatic paging is done for you automatically when you render the document.

What you need is create a doucment, add a Section to the document, then from the Section object you can create a Paragraph object and assign your unknown length of text as the content. Then all you need to do is render the document and you have your pdf document with the text flowed over multiple pages.

The examples from the download package should be sufficient to show you how you can do all these.

Hope this helps.

Paul


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 25 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