Print Page | Close Window

change font face and font size on the fly

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=1380
Printed Date: 04 Apr 26 at 10:10AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: change font face and font size on the fly
Posted By: krodrigo
Subject: change font face and font size on the fly
Date Posted: 22 Mar 10 at 8:34PM
Hi Everybody!
 
I'm using ised.dll version 4.33.1.1.
 
I'm writing a vb 6 application and would like to change text.
For instance, I need to write all the text using Arial Narrow font, size 10 and some words need to be bold, italic etc.
All the text must be justified.
 
Example text:
"Para todos efeitos de direito, fazem parte integrante do presente contrato as suas cláusulas regulamentares, devidamente registradas e arquivadas..."
 
I already did:
    Dim pDf As iSED.QuickPDF
    Set pDf = CreateObject("iSED.QuickPDF")
   
    Call pDf.UnlockKey("UnlockKey")
    Call pDf.NewDocument       
    Call pDf.SetOrigin("1")
    Call pDf.SetMeasurementUnits(1)                 'Define em milimetros
    Call pDf.SetPageSize("A4")                       'A4 portrait paper
    'Define a fonte a ser usada no arquivo
    FontArialNarrow = pDf.AddTrueTypeFont("Arial Narrow", 1)
    Call pDf.SelectFont(FontArialNarrow)
 
    Call pDf.SetTextAlign(3)

    When I used DrawHTMLTextBox, I cannot change font face to arial narrow.
    With DrawTextBox, I could change font face, but I couldn't put plain an bold text on same phrase...
 
I would appreciate any help on how I can generate this pdf file.
 
Thanks in advance.
 
 
Kleber



Replies:
Posted By: Ingo
Date Posted: 23 Mar 10 at 6:15AM
Hi Kleber!

The html-textfunctions are different to the "normal" textfunctions.
See what's possible with the html-functions here:
http://www.quickpdflibrary.com/help/quickpdf/AppendixA.php
As far as i know you can use plain and bold text in one row.
The only thing to have an eye on is not to do this in one string.
I think you have to split the string into single pieces (plain... bold... plain).

Cheers and welcome here,
Ingo


Posted By: krodrigo
Date Posted: 23 Mar 10 at 7:12PM
Hi Ingo!
 
Thank you for your answers.
 
Can you tell me how to change the font to Arial Narrow 10pt when using html?
Using html, I could change change text between plain and bold in one string, using b and /b tags, but I couldn't change font face an size, so I start using DrawTextBox.
With this one, I could change font face and size and also align it justified, but I couldn't switch between plain and bold text.
 
Thank you again for your help!



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