Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Word wrap calculation for printing
Message
From
18/11/2003 04:59:49
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00850670
Message ID:
00850900
Views:
13
Hi,

>>
I am wondering if there are any guidelines for working with these scenarios such that we can figure out the offset that is causing the discrepancies.
>>

The problems you're seeing probably arise because all your calculations are based on the screen resolution rather than that of the printer. To accurately calculate the amount of text which will fit into a specified physical space on the printer you'd have to resort to using API's such as GetTextExtentExPoint() using the specific printer hdc and then map this back to the physical screen.

Another potential problem is that not all fonts provide sufficiently accurate character sizing information - expecially when using italic etc.

Essentially, if you require real accuracy I don't think you can achieve it in VFP - we ended up building a set of VB ActiveX controls to do the job.

HTH,
Viv
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform