Print Preview / Output disagree

  • Thread starter Thread starter Michael Mitchell
  • Start date Start date
M

Michael Mitchell

To correctly print to paper, I had to offset the
MarginBounds by (-16, -16). Has anyone else had this
problem, or found a more elegant solution?
I'm printing to 8.5 x 11 inch paper and I get the same
results using sample programs.
 
Michael,
You are seeing the effects of the 'hard margins' on your printer. If
you are using Framework 1.1 you can work around this by setting the
OriginAtMargins property of the PrintDocument to true which then sets 0,0 at
your top,left margin. For Framework 1.0 you will need to PInvoke
GetDeviceCaps to get the printer margins and then translate your graphics
object appropriately at the start of each page. I have a class written in
C# that encapsulates GetDeviceCaps that you may copy if you like (just let
me know).

Ron Allen
 

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

Back
Top