PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

Auto Paging for StringBuilder Data
https://forum.pdfsharp.net/viewtopic.php?f=2&t=1666
Page 1 of 1

Author:  Chakravarthy [ Wed May 25, 2011 5:15 pm ]
Post subject:  Auto Paging for StringBuilder Data

Hi,

In my current application, I've a string builder data that is varying by size. At times, it gets more than 2 pages. Am not sure how to split the data into a standard page size and create PDF with multiple pages.

Has anyone encountered such requirement and resolved this issue. Please let me know if it can be resolved.

Thanks for reading

Author:  jeffhare [ Wed May 25, 2011 8:52 pm ]
Post subject:  Re: Auto Paging for StringBuilder Data

Unfortunately You didn't supply nearly enough information for someone to know what you're trying that doesn't work.

But, I'll take a stab at it.

Try using the higher level MigraDoc library instead of PDFsharp. You should be able to take your stringbuilder, call to string on it and add that to a formatted text object.

Check out the migradoc examples and just try them out with a very large string. I suspect it will break across pages nicely, unless you have to put that large text string inside a table cell. In that case you're kinda hosed... :)

-Jeff

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/