Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Word wrap calculation for printing
Message
De
18/11/2003 04:59:49
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00850670
Message ID:
00850900
Vues:
14
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform