PrintDocument

J

Jimmy Jam

Hi all,

I am trying to print out a listview's data in tabular format.
I have it working fairly well, but I have run across a problem.

I am trying to calculate if the resultant report is using a font size that
is too small to be readable.
I am doing my calculation in the PrintDocument's PrintPage event.

When the fontsize is below a certain size, e.g. 4 points, I want to cancel
the printing.
I have tried e.cancel = true, but I still get a blank page printed.

It seems like I should be doing my calculating, somewhere else but how can I
get the graphics object ?
Otherwise, how can I cancel the printing from the PrintPage event ?

Thanks,
Jj
 
A

AMercer

e.cancel=true in PrintPage works for me without a blank page. (hp laserjet
6p, windows xp with latest service packs).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top