By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,417 Members | 1,192 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,417 IT Pros & Developers. It's quick & easy.

Line wrap test in Printpage event

P: n/a
Does anyone know how I can calculate if a line that is about to print
during the PrintPage event of the PrintDocument is too long for the
page? I know the margins and the page width, and I've tried using the
CreateGraphics.MeasureString method to return the size of the string
that is about to print but the size being returned is often not what I
would expect (e.g., it is smaller than the page width often when I
expect it to be larger). Has anyone else successfully dealt with
testing this scenario and, if so, can you give me some hints on what I
am missing? I am using VisualStudio 2005.


Apr 4 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.