all groups > dotnet drawing api > august 2006 >
You're in the

dotnet drawing api

group:

Finding out if output is to a print preview window


Finding out if output is to a print preview window Ron Allen
8/23/2006 4:52:01 PM
dotnet drawing api:
In the release version 2.0 how do I find from inside and OnPrintPage
event handler if the output is going to a preview controller? Before 2.0
you could check the page size before compensating for printer hard margins
now that has changed. On the pre-release there was supposed to be a way to
check to see if you were in preview mode but I can't find that now.

I'm probably just missing the tree in the forest but I don't see
anything in the PrintPageEventArgs that supports this.

Ron Allen

Re: Finding out if output is to a print preview window Ron Allen
8/24/2006 4:34:56 PM
Well, my problem appears to be with the custom preview control which
isn't setting IsPreview on the associated PrintController for the
PrintDocument subclass. IsPreview shows up as false when output is going to
the preview dialog as well as to the printer.

Ron Allen
[quoted text, click to view]

AddThis Social Bookmark Button