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 - Bold text
  FAQ FAQ  Forum Search   Register Register  Login Login

Bold text

 Post Reply Post Reply
Author
Message
skwirelboy View Drop Down
Team Player
Team Player


Joined: 27 Feb 06
Status: Offline
Points: 45
Post Options Post Options   Thanks (0) Thanks(0)   Quote skwirelboy Quote  Post ReplyReply Direct Link To This Post Topic: Bold text
    Posted: 18 Aug 08 at 8:31AM
Hi,
 
I can't quite figure out how to switch between bold and non-bold text.
 
I am adding fonts to my dcument as follows:
 
QP.AddStandardFont(4);
QP.AddStandardFont(5);
 
This gives me helvetica and helvetica bold.
 
I am then calling
Qp.SelectFont(QP.FontID(4));
for non bold and
 
Qp.SelectFont(QP.FontID(5));
 
to switch to bold. But whichver one I opt for first sticks for the remainder of the document and the switch makes no difference.
 
First, am I approaching this in the correct way and if so what more do I need to do.
 
Thanks
 
Mark
 
Back to Top
jwhitham View Drop Down
Beginner
Beginner


Joined: 10 Jan 06
Location: United Kingdom
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote jwhitham Quote  Post ReplyReply Direct Link To This Post Posted: 25 Aug 08 at 2:29PM
You need to use the result of the AddStandardFont function to select the font. In Pascal it would be:
 
var afont: integer;
 
afont := qp.AddStandardFont(5);
 
qp.SelectFont(afont);
 
 
Back to Top
skwirelboy View Drop Down
Team Player
Team Player


Joined: 27 Feb 06
Status: Offline
Points: 45
Post Options Post Options   Thanks (0) Thanks(0)   Quote skwirelboy Quote  Post ReplyReply Direct Link To This Post Posted: 26 Aug 08 at 6:50AM

Thanks for the reply. I add all the fonts at the outset (ie Helvetica and HelveticaBold.

I then select them using the function in my original reply. I assumje I don't want to go adding the same font over and over again when I switch between bold and non-bold. If this assumption is correct, why does the function that I am using for selecting the fonts not seem to work.

 

Thanks

Back to Top
jwhitham View Drop Down
Beginner
Beginner


Joined: 10 Jan 06
Location: United Kingdom
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote jwhitham Quote  Post ReplyReply Direct Link To This Post Posted: 26 Aug 08 at 7:24AM

the FontID() function takes the index of the font in your document as its argument so, in your case, you would use:

Qp.SelectFont(QP.FontID(1));
for non bold and
 
Qp.SelectFont(QP.FontID(2));
 
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