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 - Precision (accuracy)
  FAQ FAQ  Forum Search   Register Register  Login Login

Precision (accuracy)

 Post Reply Post Reply
Author
Message
Autodidact View Drop Down
Team Player
Team Player
Avatar

Joined: 03 Feb 06
Status: Offline
Points: 21
Post Options Post Options   Thanks (0) Thanks(0)   Quote Autodidact Quote  Post ReplyReply Direct Link To This Post Topic: Precision (accuracy)
    Posted: 03 Feb 06 at 7:15PM

I've just started playing around with the library (DLL) and simply added one word 10 mm from the top edge and 10mm from the left edge. To my surprise it ended up only ~7 mm down.. - Why would that be?

I've been looking high and low for an obvious explanation (setting/margin or something), but didn't find any yet. SetPrecision don't make any difference, and I've yet to see another possibly relevant function to try..



Edited by Autodidact
Back to Top
DELBEKE View Drop Down
Debenu Quick PDF Library Expert
Debenu Quick PDF Library Expert
Avatar

Joined: 31 Oct 05
Location: France
Status: Offline
Points: 151
Post Options Post Options   Thanks (0) Thanks(0)   Quote DELBEKE Quote  Post ReplyReply Direct Link To This Post Posted: 04 Feb 06 at 12:31AM
Not sure of that, but perhaps the mesurements are for the base line of the text. Try with differents font size
Back to Top
Autodidact View Drop Down
Team Player
Team Player
Avatar

Joined: 03 Feb 06
Status: Offline
Points: 21
Post Options Post Options   Thanks (0) Thanks(0)   Quote Autodidact Quote  Post ReplyReply Direct Link To This Post Posted: 04 Feb 06 at 4:44AM

Indeed it is.. And it's actually stated so in the parameter description ("in tiny writing" ;). How could I miss that. By trying another font (and smaller size) it shows clearly that it is the baseline point that ends up at 10 mm since the top of the word "changes location".

Thank you very much for your suggestion!

Back to Top
Autodidact View Drop Down
Team Player
Team Player
Avatar

Joined: 03 Feb 06
Status: Offline
Points: 21
Post Options Post Options   Thanks (0) Thanks(0)   Quote Autodidact Quote  Post ReplyReply Direct Link To This Post Posted: 04 Feb 06 at 8:08AM

Doing some homework, and posting it for the sake of easy learning for others;

The [DrawText] Y-position refers to the baseline of the text. The baseline is the imaginary line upon which a line of text rests. It is also the point from which other elements of type are measured including x-height and leading.

To reference the top-left location of the word (font), one can use the following two ways:

  • Find the difference between [GetTextHeight] and [GetTextBound] (top) and then substract the difference from the returned [GetTextBound] value and use it for positioning.

Or.. the easier and probably (slightly) more accurate(?) way:

  • Use [GetTextAscent] to retrieve the height from the baseline to the top, not counting in any accents, and applying it to the measure; Ypos + Ascent value.


Edited by Autodidact
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