Keep up to date with Gravity PDF

  • This field is for validation purposes and should be left unchanged.
This is the legacy Gravity PDF v4 documentation which is NOT supported. Go to the latest documentation.
Jump To Section

Description #description

This method will return an array containing an individual PDF’s settings on a particular Gravity Form.

Version #version

This method was introduced in Gravity PDF 4.0.

Parameters #parameters

$form_id | integer
The Gravity Form ID
$pdf_id | string
The PDF internal identifier (found in the pid URL parameter when viewing individual PDF settings in the admin area)

Return #return

array | WP_Error
An array of the PDF settings will be returned on success, otherwise a WP_Error object on failure

Usage #usage

This snippet shows you how to get an individual PDF configuration and do an active if it’s currently active:

add_action( 'init', function() {
    if ( class_exists( 'GPDFAPI' ) ) {

        /* Get the individual PDF config */
        $pdf  = GPDFAPI::get_pdf( 2, '56c14c955d989' );

        if( true === $pdf['active'] ) {
            //Do something if PDF is active
        } else {
            //Do something else if PDF is inactive
} );

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.
Gravity PDF 40K Active Installs Celebration! Take 20% off any products with coupon 40KMILESTONE (this week only)Visit Store
+ +
Scroll To Top

Choose your currency:

Converted prices are for reference only - all orders are charged in $ Australian Dollars ($) AUD.
  • AUDAustralian Dollars ($)
  • USDUS Dollars ($)
  • CADCanadian Dollars ($)
  • EUREuros (€)
  • GBPPound Sterling (£)
  • NZDNew Zealand Dollar ($)
  • JPYJapanese Yen (¥)