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

Extract part of migradoc doc
https://forum.pdfsharp.net/viewtopic.php?f=2&t=3668
Page 1 of 1

Author:  wj89 [ Thu Sep 28, 2017 6:56 am ]
Post subject:  Extract part of migradoc doc

I'm creating a pdf document where each page is made up of 4 columns, the columns are generated as a migradoc document with the page size set to the column dimensions to allow for text to flow between them.

I need some way of extracting the paragraphs that flow beyond the 4th "page" and storing them in memory so that I can add them to an appendix at the end of the document.

So far I've only been able to extract the overflow as individual rendered pages(columns) but this leaves a lot of white space if there isn't much overflow, ideally I want to store the overflow paragraphs in a new migradoc document so that I can render it after all the other pages have been drawn.

Any suggestions?

Also, is there any way to remove paragraphs after they have been added?

Thanks,

Will

Author:  Thomas Hoevel [ Thu Sep 28, 2017 8:16 am ]
Post subject:  Re: Extract part of migradoc doc

Hi!
wj89 wrote:
Also, is there any way to remove paragraphs after they have been added?
There are "Elements" containers everywhere, including the Section class. You can remove or alter paragraphs any time.

Render in column format, identify the first paragraph on the fifth page, remove all paragraphs before that, and render again with a different page format.
You should activate "KeepTogether" for all paragraphs to avoid having a split paragraph at the end of the fourth page.

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