|PDFsharp & MigraDoc Foundation
|Measure a paragraph's height
|Page 1 of 1|
|Author:||ronnyek [ Mon Dec 19, 2016 4:01 am ]|
|Post subject:||Measure a paragraph's height|
With migradoc does there exist anything that will help me understand how much space a paragraph is taking up? I've got a scenario where I have some text and I need to resize an image to reasonably fit in the remaining space on a page.
I found routines that would do this... but required xgraphics and straight pdfsharp. Im assuming migradoc rendering has to know when to draw page headers and footers and such... you'd have to be able to measure the height of paragraphs etc.
Any guidance here would be helpful.
|Author:||TH-Soft [ Mon Dec 19, 2016 6:34 pm ]|
|Post subject:||Re: Measure a paragraph's height|
MigraDoc determines sizes and positions when the PdfDocumentRenderer prepares the document.
With PDFsharp 1.50 you can easily access the positions and sizes of all items.
Then you can add the image using PDFsharp methods (XGraphics) or add the image using MigraDoc methods and start the renderer again.
|Page 1 of 1||All times are UTC|
|Powered by phpBB® Forum Software © phpBB Group