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!
DrawText, DrawBox |
Post Reply |
Author | |
PatVdv
Beginner Joined: 13 Jan 21 Location: BE Status: Offline Points: 6 |
Post Options
Thanks(0)
Posted: 13 Jan 21 at 8:59AM |
Hi All,
I'm just trying to design a box under a text, for the value of the width it is correct, but I don't understand what's wrong with the height ? Patrick ie : with aPdf do begin sTxt:='PROFORMA'; SetTextSize(30); iWidth := GetTextWidth(sTxt); iHeight:= GetTextAscent - GetTextDescent; iY:=10; iX:=130; SetFillColor(0.88,0.88,0.88); DrawBox(iX,iY,iWidth,iHeight,1); SetTextColor(1,0.13,0.13); DrawText(iX,(iY+iHeight),sTxt); end; |
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Hi Patrick,
in the description for both functions (ascent/descent) you can read "...Returns the size of the selected font...". But i don't see that you've already selected a font. Try SelectFont first before you try to do the settings for a font ;-) https://www.debenu.com/docs/pdf_library_reference/SelectFont.php Here you'll find a lot for the first start: http://www.quickpdf.org/ Cheers and welcome here, Ingo |
|
Cheers,
Ingo |
|
PatVdv
Beginner Joined: 13 Jan 21 Location: BE Status: Offline Points: 6 |
Post Options
Thanks(0)
|
Thanks Ingo,
You are right, I didn't show it here, but the font was selected before. I'll go deep into the documentation anyway. Patrick |
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
LastErrorCode after each function call let you see if the last call works or fails...
|
|
Cheers,
Ingo |
|
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