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 - SetTextScaling + Align Right problem
  FAQ FAQ  Forum Search   Register Register  Login Login

SetTextScaling + Align Right problem

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


Joined: 28 Feb 08
Location: Italy
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote Compertis Quote  Post ReplyReply Direct Link To This Post Topic: SetTextScaling + Align Right problem
    Posted: 28 Feb 08 at 6:10AM
I found a problem with the text scaling
I'm drawing Right-Aligned fields on a pre-printed module
PDF lib version = 4.41 (I think I don't need to update it because I didn't find any fix I really need, and because I will need to update it in every place I use the software)
Measurement Units = mm
Origin = top left
Language = VB

Since the scaling with Left-Align works right
Draw Align Left, scaling 100%
------------------

|XXXXXXXX        |
------------------


Draw Align Left, scaling 50%
------------------

|XXXX            |
------------------


the problems come with the Right alignment

Draw Align Right, scaling 100%
------------------

|        XXXXXXXX|
------------------


Draw Align Right, scaling 50%
I got
------------------

|        XXXX    |
------------------

but I expected
------------------

|            XXXX|
------------------


I'm trying to fix it by moving the text right of the difference between the text width = 100 and the text width = myTextScaling
offset = GetTextWidth(text) - ((GetTextWidth(text) / 100) * myTextScaling)

DrawText x + offset, y, text

I need obtain the scaled text width by hand because GetTextWidth() returns always the width at 100%
The problem is that the offset I calculate is never accurate and the text is printed always at the wrong position

Thank you for any help,
Daniele
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