Вопрос

I am creating a big table with MigraDoc.

I have two issues I don't know how to solve exactly:

  1. If the content (Paragraph) of a cell is too long it breaks and I got 2 lines in my cell. I don't want this behavior. I want that the text which does not fit in the first line of the cell is hidden.

  2. If a word is too long I want also that the characters which are outside of the cell are hidden. Now they are displayed in the next cell :/ and are overlapping with the content of the next cell...

Do you know how to fix this issues?

Это было полезно?

Решение

This behavior is by design.

Use MeasureString to measure your text before you add it and truncate at the correct place (maybe adding "..." if you want).

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

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top