Print Page | Close Window

Embedded Fonts List

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


Topic: Embedded Fonts List
Posted By: rweetch
Subject: Embedded Fonts List
Date Posted: 23 Mar 11 at 4:35PM
Is there a way to get a list of the names of embedded fonts? I have looked through the docs and tried a few things, but without any joy.
 
Thanks



Replies:
Posted By: edvoigt
Date Posted: 26 Mar 11 at 5:47PM
So it goes:

var
  QP: TQuickPDF;
  i, n: integer;
  fid: integer;
begin
  QP := TQuickPDF.Create;
  if QP.UnlockKey('put your key here') = 1
  then begin
    QP.LoadFromFile('the file of your interest');
    n := QP.FindFonts;         // number of available fonts
    i := 1;                    // font-index starts with 1
    while (i<=n)              
    do begin
      fid := QP.GetFontID(i);  // get the Font-ID
      QP.SelectFont(fid);      // tell QP which font we want to deal with
// do what you want to do with it
      ShowMessage(QP.FontName+'('+QP.FontFamily+')');
      inc(i);                  // next font please
    end;
  end;
  QP.Free;

On many places of QuickPDF you'll find the same idea. There in first step to get special identifiers (somethig like windows-handles). After getting this identifier you may select a object and deal with it.

Werner



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