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 - DrawText DrawHTMLText differences
  FAQ FAQ  Forum Search   Register Register  Login Login

DrawText DrawHTMLText differences

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


Joined: 18 Jun 13
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote McHaigh Quote  Post ReplyReply Direct Link To This Post Topic: DrawText DrawHTMLText differences
    Posted: 19 Jun 13 at 5:30PM
Hi there,

    qp.DrawText(bbox.Left, pageBbox.Height - bbox.Top, word.Text);
    qp.DrawHTMLText(bbox.Left, pageBbox.Height - bbox.Top, bbox.Width, word.Text);

I'm attempting to calculate positions to place some text but these two lines of codes, which seem like they should perform identically produce different results.

DrawHTLMText places the text where I would expect, whereas DrawText places the text slightly above. (10 pixels or so)

Is the position calculated differently with these two functions?
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3530
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 19 Jun 13 at 9:30PM
Hi!

If the two functions offers the same results ... why these two functions ;-)
DrawHTMLText offers additionally support for html-tags and for this purpose 
basically there are few main settings which results in the differences.
It's your choice which of the two functions to use ;-)
In the online reference and in the developer guide you can read and see
samples with DrawText and DrawHTMLText combined...

Cheers, Ingo

Back to Top
tfrost View Drop Down
Senior Member
Senior Member


Joined: 06 Sep 10
Location: UK
Status: Offline
Points: 437
Post Options Post Options   Thanks (0) Thanks(0)   Quote tfrost Quote  Post ReplyReply Direct Link To This Post Posted: 20 Jun 13 at 4:47PM
The Drawtext vertical reference position is the text baseline, DrawHTMLText the top of the area to draw into.  The documentation makes this clear, and the latter area clearly cannot be set to match the text baseline, as in Drawtext, because this cannot be known until after the HTML has been completely processed.
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