Using WPDF 2.x, WPTools 5.x, and Delphi 6.x
We are using the WPDFPrinter to print multiple reports into a single PDF utilizing the BeginDoc / EndDoc.
Every page is initiated with StartPage and ends with EndPage.
What I want to do is create a two pass system where I can determine how many pages this document will be so I can inject a Page n of z at the bottom right of every page.
What I would like to figure out is what math would I use and code to make it always print at the same position on all pages regardless of orientation. So essentially the text always starts at .35 inches above the bottom of the page and the right aligned text is always .35 inches to the left of the right side of the page...
So I know I am using the Canvas.TextOut, but I am not sure of what to use to always put the text in the same area. I am guessing I would use the page width and page height values and subtracting some number to get the position to start the text.
I am also not sure what to pass to make it right aligned (This isn't critical, but figured right aligning would be helpful). Most important issue is what math to get the same starting position.