Quantcast
Channel: HTML Renderer
Viewing all articles
Browse latest Browse all 693

New Post: Is HTML Renderer suitable for measuring the size of rich text?

$
0
0
yes, you can use HTML Renderer to measure size.
  1. you don't have to wrap the html snippet, you can measure it directly and provide separate CSS styles.
  2. no need to create image, you can create Graphics object by "Graphics.FromHwnd(IntPtr.Zero)".
  3. be sure to remove all default margins see CssDefaults.cs. I think you see 8px body margin.
  4. i'm not aware of any text wrapping issues, also will not advice to do it in the first place, better to handle it using alignment, maybe put it in a table.

Viewing all articles
Browse latest Browse all 693

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>