Re: Finding the printable area?
From: Ron Allen (rallen_at__nospam_src-us.com)
Date: 04/13/04
- Next message: Jay B. Harlow [MVP - Outlook]: "Re: framework 1.1 to 1.0"
- Previous message: Cowboy \(Gregory A. Beamer\): "Re: A good book."
- In reply to: Steve Podradchik: "Finding the printable area?"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 13 Apr 2004 08:34:10 -0400
Steve,
You will need to use PInvoke on GetDeviceCaps to find the exact margins.
In version 1.1 you can set a property in PageSettings to start the origin at
the margins vs. the physical boundary but that doesn't tell you the size of
the physical printable area. Just get your hDC from the graphics and call
GetDeviceCaps to check sizes. If you would like some C# code for this let
me know.
Ron Allen
"Steve Podradchik" <StevePodradchik@hotmail.com> wrote in message
news:uQZi08MIEHA.828@TK2MSFTNGP12.phx.gbl...
> Hi,
>
> Our app likes to print data-rich output that fills the page width of the
> printer. Unfortunately, we've found that the printable area of each
printer
> is a little different, making it a bit of a guess to set the left/right
> print margins which seem additive to the printable area start. I don't
> believe that .Net directly supports providing the printable area but I
seem
> to remember someone, > 1 year ago, posting some C code to find the
printable
> area. Any ideas? Or did I miss something in .Net?
>
> Thanks, Steve
>
>
- Next message: Jay B. Harlow [MVP - Outlook]: "Re: framework 1.1 to 1.0"
- Previous message: Cowboy \(Gregory A. Beamer\): "Re: A good book."
- In reply to: Steve Podradchik: "Finding the printable area?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|