|
PDFsharp - moved to http://forum.pdfsharp.net/ Please visit the new PDFsharp forum at http://forum.pdfsharp.net/
|
Important Notice:
We regret to inform you that our free phpBB forum hosting service will be discontinued by the end of June 30, 2024.
If you wish to migrate to our paid hosting service, please contact billing@hostonnet.com.
View previous topic :: View next topic |
Author |
Message |
trimpy
Joined: 19 Sep 2008 Posts: 1
|
Posted: Fri Sep 19, 2008 5:42 pm Post subject: automatic page breaks |
|
|
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 |
|
Back to top |
|
|
stardust
Joined: 05 Sep 2008 Posts: 5
|
Posted: Fri Sep 19, 2008 5:50 pm Post subject: |
|
|
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 |
|
Back to top |
|
|
|
|
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 vote in polls in this forum
|
|