Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
GetHTMLTextHeight bug? |
Post Reply |
Author | |
Hopeful
Beginner Joined: 19 Jul 06 Location: United Kingdom Status: Offline Points: 18 |
Post Options
Thanks(0)
Posted: 30 Jun 07 at 12:59PM |
I am using v 5.22.0.119 of the library
For a single line of text (which appears fine is the resulting PDF doc), I get the correct result from GetWrappedTextHeight (5.8250666666667mm). However, for the same text and width, GetHTMLTextHeight returns 1239476.0000000
Is this a bug?
|
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Hi!
What's your complete line of code in this case? The HTML-functions are completely different from the normal pdf-functions. I THINK the font height is relative to the value for "width" and the string-length. Best regards, Ingo |
|
Hopeful
Beginner Joined: 19 Jul 06 Location: United Kingdom Status: Offline Points: 18 |
Post Options
Thanks(0)
|
Hi Ingo
It's nice to get such a quick reply
Here's the relevant lines of (C++) code:
double WidthBetweenMargins = 92.0;
double tmp1 = isedFunctions.GetHTMLTextHeight(WidthBetweenMargins, "Sample text which fits on a single line");
double tmp2 = isedFunctions.GetWrappedTextHeight(WidthBetweenMargins, "Sample text which fits on a single line"); Before this code there is the following:
isedFunctions.SetMeasurementUnits(1); // 1 = millimetres
isedFunctions.SetPageDimensions(112, 600); isedFunctions.SetOrigin(1); // top left Colin
|
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Hi!
I don't think that the html-functions works like the other ones having to do with fonts and text. Try setmeasurementunits(0) (for pixels)... Is the returned value okay? Best regards, Ingo |
|
Hopeful
Beginner Joined: 19 Jul 06 Location: United Kingdom Status: Offline Points: 18 |
Post Options
Thanks(0)
|
I tried SetMeasurementUnits(0) and the two calls still return completely different values.
I don't see why the html-functions should be any different - I thought that they were just taking the html formatting into consideration.
|
|
Hopeful
Beginner Joined: 19 Jul 06 Location: United Kingdom Status: Offline Points: 18 |
Post Options
Thanks(0)
|
Ingo I am going to have a look at the source code to see if I can work out what's going on (unless Marian beats me to it ). I have the source code to v 3.78 - please tell me where to send one of the .pas files to prove this so that I can get the latest source. Colin
|
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Hi Colin!
EVERY help is welcome. Many shoulders are better than one ;-) You can send the pas-file to Michel or me. After this you'll get the password for the download-section. Best regards, Ingo Edited by Ingo - 02 Jul 07 at 5:55PM |
|
marian_pascalau
Debenu Quick PDF Library Expert Joined: 28 Mar 06 Location: Germany Status: Offline Points: 278 |
Post Options
Thanks(0)
|
Hi Hopeful, Hi Ingo,
send please a sample of your problem to support@quickpdf.org and I will check your problem. I will send correction to Ingo and he will integrate into the last public sourcecode release.
Best regards, Marian
|
|
Hopeful
Beginner Joined: 19 Jul 06 Location: United Kingdom Status: Offline Points: 18 |
Post Options
Thanks(0)
|
This turned out to NOT be a bug. I am using the dll with a Visual C++ application and I have to create my own set of header files. I had mistakenly declared GetHTMLTextHeight as returning an int instead of a double
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store