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!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - GetHTMLTextHeight bug?
  FAQ FAQ  Forum Search   Register Register  Login Login

GetHTMLTextHeight bug?

 Post Reply Post Reply
Author
Message
Hopeful View Drop Down
Beginner
Beginner


Joined: 19 Jul 06
Location: United Kingdom
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hopeful Quote  Post ReplyReply Direct Link To This Post Topic: GetHTMLTextHeight bug?
    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?
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 30 Jun 07 at 1:14PM
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

Back to Top
Hopeful View Drop Down
Beginner
Beginner


Joined: 19 Jul 06
Location: United Kingdom
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hopeful Quote  Post ReplyReply Direct Link To This Post Posted: 30 Jun 07 at 4:33PM
Hi Ingo
It's nice to get such a quick reply Smile
 
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
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 01 Jul 07 at 3:31AM
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
Back to Top
Hopeful View Drop Down
Beginner
Beginner


Joined: 19 Jul 06
Location: United Kingdom
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hopeful Quote  Post ReplyReply Direct Link To This Post Posted: 01 Jul 07 at 3:51AM
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.
Back to Top
Hopeful View Drop Down
Beginner
Beginner


Joined: 19 Jul 06
Location: United Kingdom
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hopeful Quote  Post ReplyReply Direct Link To This Post Posted: 02 Jul 07 at 1:48PM

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 Smile). 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
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 02 Jul 07 at 2:44PM
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
Back to Top
marian_pascalau View Drop Down
Debenu Quick PDF Library Expert
Debenu Quick PDF Library Expert


Joined: 28 Mar 06
Location: Germany
Status: Offline
Points: 278
Post Options Post Options   Thanks (0) Thanks(0)   Quote marian_pascalau Quote  Post ReplyReply Direct Link To This Post Posted: 02 Jul 07 at 4:55PM
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
Back to Top
Hopeful View Drop Down
Beginner
Beginner


Joined: 19 Jul 06
Location: United Kingdom
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hopeful Quote  Post ReplyReply Direct Link To This Post Posted: 14 Jul 07 at 6:13AM
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 Embarrassed
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store