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 - AddStandardFont and text height
  FAQ FAQ  Forum Search   Register Register  Login Login

AddStandardFont and text height

 Post Reply Post Reply
Author
Message
LuProch View Drop Down
Beginner
Beginner
Avatar

Joined: 01 Feb 13
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote LuProch Quote  Post ReplyReply Direct Link To This Post Topic: AddStandardFont and text height
    Posted: 07 Mar 13 at 11:23AM
In the code snippet below I draw two texts - first with font from AddTrueTypeSubsettedFont, second with font from AddStandardFont. They are both Times New Roman and they should be the same. But first line of the second text is shifted up and line spacing is smaller.

I have some problems with text justification and AddStandardFont seems to be my only option. How can I make it behave the same as AddTrueTypeSubsettedFont?

quickPDF.SetOrigin(1); // top left
quickPDF.SetMeasurementUnits(1); // millimetres

quickPDF.DrawBox(10, 10, 100, 50, 0);

int ID = quickPDF.AddTrueTypeSubsettedFont("Times New Roman", "a ", 0);
quickPDF.SetHTMLNormalFont("Default", ID);
quickPDF.DrawHTMLText(10, 10, 50, "<font size=\"20pt\"><p align=\"left\">aaaaaaaa aaaaa aaaa aaaaa aaaaa aaaaa aaaaaaaaaaaa</p></font>");

ID = quickPDF.AddStandardFont(8); // Times New Roman
quickPDF.SetHTMLNormalFont("Default", ID);
quickPDF.DrawHTMLText(60, 10, 50, "<font size=\"20pt\"><p align=\"left\">aaaaaaaa aaaaa aaaa aaaaa aaaaa aaaaa aaaaaaaaaaaa</p></font>");

http://s22.postimage.org/fu08phwtt/Line_spacing.png
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