Version: 5
CAUTION
️Version 5 of Gravity PDF does not have full support for Gravity Forms 2.5 and you should consider upgrading to version 6. If you cannot, version 5 will still function but have a degraded admin experience. Support and bug/security fixes will be provided until 27 April 2023.Gravity PDF API – get_pdf_fonts()
Description
This function allows you to retrieve an associative PHP array with all available fonts.
Version
This method was introduced in Gravity PDF 4.3.
Parameters
This method accepts no parameters.
Return
array
- A multi-dimensional array, with the list of installed fonts grouped together.
Usage
$fonts_list = GPDFAPI::get_pdf_fonts();
foreach( $fonts_list as $group_name => $group ) {
foreach( $group as $font_id => $font_name ) {
//do something with the font name / ID
}
}
Source Code
This method is located in api.php
.