←Select platform

Fonts Property

Summary

(Deprecated) Gets a list of the fonts found on this page.

NOTE: This property has been deprecated. Use PDFDocument.Fonts instead.

Syntax
C#
C++/CLI
Java
Python
[ObsoleteAttribute("This property has been deprecated. The fonts are stored in PDFDocument.Fonts")] 
public IList<PDFFont> Fonts {get;} 
public java.util.List<PDFFont> getFonts(); 
public:  
   [ObsoleteAttribute(L"This property has been deprecated. The fonts are stored in PDFDocument.Fonts")] 
   property IList<PDFFont^>^ Fonts 
   { 
      IList<PDFFont^>^ get() 
   } 
Fonts # get  (PDFDocumentPage) 

Property Value

An IList of PDFFont items that contains the fonts found on this page. The default value is null.

Remarks

By default, the Fonts, Annotations, Objects, FormFields, Signatures and Hyperlinks lists are not populated when a new PDFDocument is created and the values of these properties are null. You must call the PDFDocument.ParsePages method to parse the items are you interested in (depending on the PDFParsePagesOptions passed as the options parameter to the method). This is done for performance reasons and to give the user the ability to parse only the objects and pages of interest.

The Fonts list will be populated if PDFParsePagesOptions.Fonts is passed as part of the options parameter to PDFDocument.ParsePages. After this method returns, all the pages parsed will have their Fonts properties populated either with a list of the fonts found in the page or an empty list (with IList.Count equals to 0).

When parsing is finished, the Objects and Hyperlinks properties will contain a list of the PDFObject and PDFHyperlink items found in the page (if PDFParsePagesOptions.Objects and PDFParsePagesOptions.Hyperlinks was selected). Each of these items contain a PDFTextProperties object that contain the text properties of the item such its font information and color. One of these properties is PDFTextProperties.FontIndex which is the 0-based integer index to the font of the item in the Fonts list.

If PDFParsePagesOptions.Fonts is not passed to PDFDocument.ParsePages, but PDFParsePagesOptions.Objects and PDFParsePagesOptions.Hyperlinks was selected, then the fonts are not parsed and the PDFTextProperties.FontIndex value of any returned object will be 0.

Requirements

Target Platforms

Help Version 22.0.2023.7.10
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Pdf Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.