Print Page | Close Window

Selecting Fonts for DrawText... Functions.

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=682
Printed Date: 27 Jan 26 at 10:18PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Selecting Fonts for DrawText... Functions.
Posted By: PhilG
Subject: Selecting Fonts for DrawText... Functions.
Date Posted: 18 Mar 07 at 3:10PM
Does anyone know how to select an existing embedded font?  I have a PDF that already has about 13 fonts embedded in it and I need to select a particular one before using the DrawWrappedText function.
 
I've seen samples where the fonts were added and the IDs remembered in the process and refered to later, but what about where the fonts are already embedded in the PDF.  How do you use them in writing new text to the PDF?  The SelectFont method requires that you already know the FontID of the desired font.  I need something like SelectFont("Arial").  Thanks.



Replies:
Posted By: Ingo
Date Posted: 18 Mar 07 at 3:27PM
Hi Phil!

With FindFonts you can get the number of embedded fonts.
In a loop now you can go through all found fonts with
FontID -> SelectFont (with FontID) -> FontName.
If the fontname is the one you want you can break the loop (SelectFont is already done) beginning with the DrawText-functions.

Best regards,
Ingo




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