Skip to content

Instantly share code, notes, and snippets.

@jakejackson1
Last active April 3, 2024 23:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jakejackson1/d98b99fd504a5a300f1a to your computer and use it in GitHub Desktop.
Save jakejackson1/d98b99fd504a5a300f1a to your computer and use it in GitHub Desktop.
A simple Hello World PDF template for Gravity PDF
<?php
/**
* Template Name: Hello World
* Version: 0.1
* Description: A basic "Hello World" PDF template showing custom PDF templates in action
* Author: Jake Jackson
* Author URI: https://gravitypdf.com
* Group: Sol System
* License: GPLv2
* Required PDF Version: 4.0
* Tags: space, solar system, getting started
*/
/* Prevent direct access to the template (always good to include this) */
if ( ! class_exists( 'GFForms' ) ) {
return;
}
/**
* All Gravity PDF v4/v5/v6 templates have access to the following variables:
*
* @var array $form The current Gravity Form array
* @var array $entry The raw entry data
* @var array $form_data The processed entry data stored in an array
* @var object $settings The current PDF configuration
* @var array $fields An array of Gravity Form fields which can be accessed with their ID number
* @var array $config The initialised template config class – eg. /config/zadani.php
*/
?>
<!-- Any PDF CSS styles can be placed in the style tag below -->
<style>
</style>
<h1>Hello World</h1>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment