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!
![]() |
Get Font ID Using Font Name |
Post Reply ![]() |
Author | |
BoHo ![]() Beginner ![]() Joined: 03 Apr 14 Location: Montana Status: Offline Points: 2 |
![]() ![]() ![]() ![]() ![]() Posted: 03 Apr 14 at 7:50PM |
Hi,
I am evaluating the QuickPDF Library and I'm pretty new to using it. What I'm doing right now is accessing text objects in a CAD vector file and then converting it to a PDF file in VB6. When I access the text object in the vector file I can get the font's name, size and alignment flags used with the text. Then, I add the font to the PDF document using AddTrueTypeFont(). What I need to know is if there is a way to determine if a font has already been added to the PDF document by using the font's name to search for it prior to adding another one. And then., to be able to get the font ID using the font's name. I thought that if I added a font that had already been added previously, using AddTrueTypeFont(), that it would just return the id of the existing font. But it doesn't. It returns a new id even though I know that that particular font had already been added once. And since it's a new id I'm guessing that it's doubling up the font information for that particular font. Is there anyway to search the fonts already added to a document by using the fonts name? Or do I need to keep track of the font's Id/Names myself in VB6 to know if it has already been added? Thanks for any help. |
|
![]() |
|
hrdware ![]() Team Player ![]() ![]() Joined: 16 May 13 Location: Oklahoma, USA Status: Offline Points: 24 |
![]() ![]() ![]() ![]() ![]() |
The easiest way is going to be to keep track of the fonts and their ID numbers as you add them.
If you are using an existing document, I think you should be able to use the FindFonts call to get the number of fonts in the document, then loop through that list calling GetFontID to create a list of FontID's, then go through your list of FontID's, select each font and call FontName to get the name associated with each FontID. |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store