I been getting feedback from users about one of my tools always printing a blank page after the actual content pages are completed (regardless of the number of pages).
I always use a Graphics.NextPage call at the end of each page - including the last page, and it appears that this is the cause. However, removing the last NextPage call results in the document not actually printing. It cues up, but the document never comes out of the printer (tested on multiple printers).
How can I print a Graphics item to print such that all of the content is printed without the blank final page?
Are you setting p = nil when you’re done? Or just letting it go out of scope? I’ve had trouble getting a job to not print, but never had a problem with it stalling.
Make sure you end on the right page. Basically, keep in mind that the last page shouldn’t be calling Graphics.NextPage since the Graphics object will automatically print it for you when it goes out of scope.
Alain and Tim H - that was the problem :O. I was not setting P to Nil, so it never went out of scope until the app exits. Setting p = Nil if I’m on the last page fixed it.
And look, a legacy application just got an update. Customers love updates, even if nothing real important has changed.