Thomas Hoevel wrote:
kiskeya wrote:
These margins were set at the top
Yes. But page height includes these margins, but not in your code.
If you need 3 cm top margin and 3 cm bottom margin and 8 cm for text lines, then you will need a page height of 14 cm. But your code would set 8 cm only because you don't add the margins.
This could make a big difference already.
I see what you mean but I did take that into account in the height calculation ( 1 cm top and 1 cm bottom = 2 which I added):
double height = 2.0 + ((double)PrintLinesList.Count) / 3.0 + (PrintLinesList.Count % 3 > 0 ? 1.0 : 0.0);
But you are right, it should have been:
double height = TopMargin + BottomMargin + ((double)PrintLinesList.Count) / 3.0 + (PrintLinesList.Count % 3 > 0 ? 1.0 : 0.0);
Thanks.