Keep up to date with Gravity PDF

  • This field is for validation purposes and should be left unchanged.
This is the documentation for version 4 of Gravity PDF. See version 3 docs here.

Jump To Section

Description #description

When called this method returns the existing global PDF plugins settings.

Version #version

This method was introduced in Gravity PDF 4.0.

Return #return

array
Returns an array of the global PDF plugin settings

Usage #usage

This following snippet retrieves the global PDF settings and read the default_pdf_size option:

add_action( 'init', function() {
    if ( class_exists( 'GPDFAPI' ) ) {
        $settings         = GPDFAPI::get_plugin_settings();
        $default_pdf_size = ( isset( $settings['default_pdf_size'] ) ) ? $settings['default_pdf_size'] : '';
    }
} );

Source Code #source-code

This method is located in api.php.

Signup for the latest Gravity PDF news, tips and updates

  • This field is for validation purposes and should be left unchanged.
Scroll To Top