GetTextExtentPoint32 Reporting Wrong Size

Post here if you have problems installing or using doPDF.
Post Reply
Mtnsoft
Posts: 1
Joined: Fri Jun 15, 2012 6:14 pm

Post by Mtnsoft »

I am using doPDF to test some printing software I am working on. My program needs to fit text within a given space, and determines the text length by calling the GetTextExtentPoint32 API in Windows. Unfortunately, that API is reporting inaccurate width measurements from doPDF.
For instance, I have a box that is 1274 pixels wide on the page (landscape), and doPDF reports text that should fit as being 1273 pixels wide. However, when displayed or printed, the text actually extends out past the box dimensions.
The exact same code works perfectly for screen measurements, and on my physical printers (Brother HN-5250DN and Samsung CLP-315W). I only get inaccurate measurements when using doPDF.
Thanks,
Anthony


Claudiu (Softland)
Posts: 1560
Joined: Thu May 23, 2013 7:19 am

Post by Claudiu (Softland) »

Hello,
In order to troubleshoot this we would need a test application or some sources where you have this association. Please send use any info you can to our support team at [email protected] and we will have a further look.

Follow us to stay updated:

Post Reply