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 - change font face and font size on the fly
  FAQ FAQ  Forum Search   Register Register  Login Login

change font face and font size on the fly

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

Joined: 22 Mar 10
Location: Brazil
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote krodrigo Quote  Post ReplyReply Direct Link To This Post Topic: change font face and font size on the fly
    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
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3530
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
krodrigo View Drop Down
Beginner
Beginner
Avatar

Joined: 22 Mar 10
Location: Brazil
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote krodrigo Quote  Post ReplyReply Direct Link To This Post 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!
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