Hello,
I have a small application that needs to print text. I am having a
devil of a time getting accurate measurements to determine how much page
area I have to draw on. PageSize does not appear to be accurate, and
I'm guessing there is some non-printable area of the printer I need to
deduct.
I know of the Demo that comes with wxWidgets, and I don't need to print
a stretched bitmap. I need to get accurate page metrics so I can lay
out my text, determine page counts, etc.
Does anybody know of a good example of printing and determining page
metrics?
Does anybody know of a good example of printing and determining page
metrics?
Sorry, no. I've managed to avoid this so far (but won't be able to forever!)
However,m there was a fair bit of discussion about this on the wx-users list recently, I'd look there, with a title:
"pimpl on the face of printing"
A key point:
wx.PrinterDC puts the origin at the corner of the printable area, NOT the corner of the page (with Postscipt they are the same, but not for other printers).
There are methods for figuring out what else you need. It is harder than it should be though!
When you get it figured out, please put a page in the Wiki about it!
-Chris
···
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Hello, I have a small application that needs to print text. I am having a
devil of a time getting accurate measurements to determine how much page
area I have to draw on. PageSize does not appear to be accurate, and
I'm guessing there is some non-printable area of the printer I need to
deduct.
I know of the Demo that comes with wxWidgets, and I don't need to print
a stretched bitmap. I need to get accurate page metrics so I can lay
out my text, determine page counts, etc.
Does anybody know of a good example of printing and determining page
metrics?
The printing demo in the book prints multiple pages of text. If you don't have the book you can download the sample sources from the Manning website.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!