Hi,
I am trying to generate a PDF using XSL(XML-FO) to transform a generated XML from a database.
Because of complex rules in terms of paging for this document, calculations are done in determining the page breaks when I generate the XML that will be consumed by the XSL. I have noticed that I've been getting inconsistent results with these calculations. For instance, the required print area in terms of height is 9 inches which I then convert to points by multiplying it by 72 (being 72 points per inch) = 648 points.
So for every line, I use MeasureString to get the height of the line which I then subtract from 648 to see if there are still available space to print the line. But whenever a page break is determined, there would be a large whitespace that is left at the bottom. It is as if the 648pt conversion is wrong. Now I am also concerned that the height being returned by the MeasureString method may also be wrong.
I apologize for the long post but I appreciate any input/suggestion as to what I might be doing wrong.
Thanks a lot!