migradoc

Migradoc measure table cell content


Is it possible to measure migradoc table cell content length? I want to create a table component which will recalculate columns width according actual content length and settings. As for now, I can measure text length. This gives me ability to calculate necessary column width for text only column. But in case of more complex structure, how to calculate necessary column width?


Solution

  • For more complex content, you need a more complex measure routine.

    Or maybe let MigraDoc prepare a dummy document with your cell content so you can query the layout information for that dummy document and calculate column width based on this layout info.