0

I am creating a Flowdocument with several Paragraphs dynamically, in order te take advantage of the Paragraph's KeepTogether property. In this way the paragraphs will never be split across two pages when printing.

The paragraphs will have different size between two printjobs, but within a single print job they will always have the same size. I want to take advantage of this by adjusting the numbering of the paragraphs so that the first paragraph on each page will be consecutive to the number of the first paragraph on the previous page.

To be able to do this I need to know how many paragraphs will fit on one page. How can I do this?

Dabblernl
  • 15,831
  • 18
  • 96
  • 148
  • That depends on the printer and page size. If you want tight control then why not use a FixedDocument. – paparazzo Mar 06 '14 at 17:46
  • How would a FixedDocument help me then? I tried that first, but printing stopped after the first page. – Dabblernl Mar 06 '14 at 17:54
  • If your FlowDocument height can be determined, you can look at the LineHeight of each Block within a Paragraph and add them up to determine if any number of paragraphs will fit, no? – Tyler Morrow Mar 06 '14 at 23:38

0 Answers0