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

Our options class handles all the settings registration and display, as well as providing a full CRUD (create, read, update, delete) for our stored global and individual PDF settings. All the CRUD functionality is available directly through our API so you won’t need to call it from the options class directly. For full details about utilising the options class we recommend reviewing the src/helper/abstract/Helper_Abstract_Options.php file.

Version #version

This method was introduced in Gravity PDF 4.0.

Return #return

\GFPDF\Helper\Helper_Options_Fields | object
The options class

Usage #usage

This snippet shows how to access our options class and get a list of Gravity PDF’s supported paper size:

add_action( 'init', function() {
    if ( class_exists( 'GPDFAPI' ) ) {
        /* Get Gravity PDF options class */
        $options    = GPDFAPI::get_options_class();
        $paper_size = $options->get_paper_size();
        //Do what ever you want with the paper size array
} );

Source Code #source-code

This method is located in api.php and the options class can be found in src/helper/abstract/Helper_Abstract_Options.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 (¥)