I need to calculate the rendered html font size in order to auto clean some content designed for full page width to fit nicely into a Multi-Column report.
I would love to invoke the private "MeasureContent" if I can instantiate my own context object.
Or some sort of HtmlTextBox.ToImage() to pull width/height from.
The problem is that there are an infinite number of possibilities generated from the horrific FREERICHTEXTBOX WYSIWYG control. I'm using the HtmlAgilityPack to delete and merge redundant FONT tags so my end HTML is pretty tight.
I've also flattened the HtmlTextNodes into a List of Lists split by block level elements so that I can individual calculate the different rendered elements within each line to determine its width in order to shrink user defined padding "&nbps;" and input lines "______".
I was going to use the System.Drawing.Graphics.MeasureString, but I'm uncertain on how the FONT SIZE 1-7 becomes relative.
If the textbox fontsize is 11pt, or 1.2in, is the relative measurement type always in POINTS?
Thanks
Steve
I would love to invoke the private "MeasureContent" if I can instantiate my own context object.
Or some sort of HtmlTextBox.ToImage() to pull width/height from.
The problem is that there are an infinite number of possibilities generated from the horrific FREERICHTEXTBOX WYSIWYG control. I'm using the HtmlAgilityPack to delete and merge redundant FONT tags so my end HTML is pretty tight.
I've also flattened the HtmlTextNodes into a List of Lists split by block level elements so that I can individual calculate the different rendered elements within each line to determine its width in order to shrink user defined padding "&nbps;" and input lines "______".
I was going to use the System.Drawing.Graphics.MeasureString, but I'm uncertain on how the FONT SIZE 1-7 becomes relative.
If the textbox fontsize is 11pt, or 1.2in, is the relative measurement type always in POINTS?
Thanks
Steve