Print Page | Close Window

AddStandardFont and text height

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=2556
Printed Date: 30 Sep 24 at 1:49AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: AddStandardFont and text height
Posted By: LuProch
Subject: AddStandardFont and text height
Date 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 http://www.quickpdf.org/forum/Embedding-font-subset-vs-text-align_topic2526.html - 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 - http://s22.postimage.org/fu08phwtt/Line_spacing.png



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk