Search code examples
migradoc

MigraDoc Paragraph Text, possible to Truncate?


The Paragraph in MigraDoc automatically wraps text and adjust the height automatically. I want to be able to Truncate the text and if possible get it to Shrink to Fit. Has anyone accomplished this or have any idea how to do so?


Solution

  • You can use functions from PDFsharp to query the size of the text - and then reduce font size or shorten the text until it fits.

    See also here:
    http://forum.pdfsharp.net/viewtopic.php?p=6158#p6158