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 - TextOut and TextWidth
  FAQ FAQ  Forum Search   Register Register  Login Login

TextOut and TextWidth

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


Joined: 23 May 17
Location: UK
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote mauricef Quote  Post ReplyReply Direct Link To This Post Topic: TextOut and TextWidth
    Posted: 23 May 17 at 3:44PM
I'm building a PDF using the canvas, so I'm calling GetCanvasDC and LoadFromCanvasDC, and in between have a series of calls to Canvas.TextOut. The text being written to the canvas needs to be right-aligned so I'm using Canvas.TextWidth to calculate the start offset of the text in relation to the right-hand edge of the page. I have two distinct issues with this.

Firstly TextWidth doesn't seem to be very accurate. The longer the text being printed, the bigger the gap I have between the end of the text and the right-hand edge of the page. Secondly if the text being printed is only a single character then it prints the text in a tiny font. If two characters the font is slightly bigger, and if three characters or more it prints in the correct font size.

Has anyone else experienced problems like this?
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