Gravity PDF - Version 3.7.7

Version Description

  • Bug - Ensure 'gfpdf_post_pdf_save' action gets triggered for all PDFs when resending notifications
  • Housekeeping - Remove compress.php from mPDF package (unneeded)
Download this release

Release Info

Developer Blue Liquid Designs
Plugin Icon 128x128 Gravity PDF
Version 3.7.7
Comparing to
See all releases

Code changes from version 3.7.6 to 3.7.7

README.txt CHANGED
@@ -1,9 +1,10 @@
1
  === Plugin Name ===
2
  Contributors: blueliquiddesigns
 
3
  Tags: gravity, forms, pdf, automation, attachment
4
  Requires at least: 3.9
5
  Tested up to: 4.5
6
- Stable tag: 3.7.6
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl.txt
9
 
@@ -85,6 +86,10 @@ All FAQs can be [viewed on the Gravity PDF website](https://gravitypdf.com/#faqs
85
 
86
  == Changelog ==
87
 
 
 
 
 
88
  = 3.7.6 =
89
  * Bug - Added full support for all Gravity Forms notification events (includes Payment Complete, Payment Refund, Payment Failed, Payment Pending ect)
90
  * Bug - Resolve mPDF PHP7 image parsing error due to a change in variable order parsing.
1
  === Plugin Name ===
2
  Contributors: blueliquiddesigns
3
+ Donate link: https://gravitypdf.com
4
  Tags: gravity, forms, pdf, automation, attachment
5
  Requires at least: 3.9
6
  Tested up to: 4.5
7
+ Stable tag: 3.7.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl.txt
10
 
86
 
87
  == Changelog ==
88
 
89
+ = 3.7.7 =
90
+ * Bug - Ensure 'gfpdf_post_pdf_save' action gets triggered for all PDFs when resending notifications
91
+ * Housekeeping - Remove compress.php from mPDF package (unneeded)
92
+
93
  = 3.7.6 =
94
  * Bug - Added full support for all Gravity Forms notification events (includes Payment Complete, Payment Refund, Payment Failed, Payment Pending ect)
95
  * Bug - Resolve mPDF PHP7 image parsing error due to a change in variable order parsing.
helper/pdf-render.php CHANGED
@@ -38,11 +38,6 @@ class PDFRender
38
  {
39
  global $gfpdfe_data;
40
 
41
- /*
42
- * Because we merged the create and attach functions we need a measure to only run this function once per session per lead id.
43
- */
44
- static $pdf_creator = array();
45
-
46
  /*
47
  * Set user-variable to output HTML instead of PDF
48
  */
@@ -60,22 +55,6 @@ class PDFRender
60
  $template = $arguments['template'];
61
  $output = (isset($arguments['output']) && strlen($arguments['output']) > 0) ? $arguments['output'] : 'save';
62
 
63
- /*
64
- * Check if the PDF exists and if this function has already run this season
65
- */
66
- if(in_array($lead_id, $pdf_creator) && file_exists($gfpdfe_data->template_save_location . $id . '/' . $filename))
67
- {
68
- /*
69
- * Don't generate a new PDF, use the existing one
70
- */
71
- return $gfpdfe_data->template_save_location . $id . '/' . $filename;
72
- }
73
-
74
- /*
75
- * Add lead to PDF creation tracker
76
- */
77
- $pdf_creator[] = $lead_id;
78
-
79
  /*
80
  * Add filter before we load the template file so we can stop the main process
81
  * Used in premium plugins
38
  {
39
  global $gfpdfe_data;
40
 
 
 
 
 
 
41
  /*
42
  * Set user-variable to output HTML instead of PDF
43
  */
55
  $template = $arguments['template'];
56
  $output = (isset($arguments['output']) && strlen($arguments['output']) > 0) ? $arguments['output'] : 'save';
57
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
  /*
59
  * Add filter before we load the template file so we can stop the main process
60
  * Used in premium plugins
mPDF/compress.php DELETED
@@ -1,172 +0,0 @@
1
- <?php
2
-
3
- $excl = array( 'HTML-CSS', 'DIRECTW', 'TABLES', 'LISTS', 'IMAGES-CORE',
4
- 'IMAGES-BMP', 'IMAGES-WMF', 'TABLES-ADVANCED-BORDERS', 'HTMLHEADERS-FOOTERS', 'COLUMNS', 'TOC', 'INDEX', 'BOOKMARKS', 'BARCODES', 'FORMS', 'WATERMARK', 'CJK-FONTS', 'RTL', 'INDIC', 'ANNOTATIONS', 'BACKGROUNDS', 'CSS-FLOAT', 'CSS-IMAGE-FLOAT', 'CSS-POSITION', 'CSS-PAGE', 'BORDER-RADIUS', 'HYPHENATION', 'ENCRYPTION', 'IMPORTS', 'PROGRESS-BAR');
5
-
6
-
7
- // *DIRECTW* = Write, WriteText, WriteCell, Text, Shaded_box, AutosizeText
8
- // IMAGES-CORE = [PNG, GIF, and JPG] NB background-images and watermark images
9
-
10
- // Excluding 'HTML-CSS' will also exclude: 'TABLES', 'LISTS', 'TABLES-ADVANCED-BORDERS', 'HTMLHEADERS-FOOTERS', 'FORMS', 'BACKGROUNDS', 'CSS-FLOAT', 'CSS-IMAGE-FLOAT', 'CSS-POSITION', 'CSS-PAGE', 'BORDER-RADIUS'
11
-
12
- // Text is marked in mpdf_source.php with e.g. :
13
- /*-- TABLES-ADVANCED-BORDERS --*/
14
- /*-- END TABLES-ADVANCED-BORDERS --*/
15
- // *TABLES-ADVANCED-BORDERS*
16
-
17
-
18
- if (!isset($_POST['generate']) || $_POST['generate']!='generate') {
19
-
20
-
21
- if (!file_exists('mpdf_source.php')) {
22
- die("ERROR - Could not find mpdf_source.php file in current directory. Please rename mpdf.php as mpdf_source.php");
23
- }
24
-
25
-
26
-
27
-
28
- echo '<html>
29
- <head>
30
- <script language=javascript>
31
- checked=false;
32
- function checkedAll (frm1) {
33
- var aa= document.getElementById("frm1");
34
- if (checked == false)
35
- {
36
- checked = true
37
- }
38
- else
39
- {
40
- checked = false
41
- }
42
- for (var i =0; i < aa.elements.length; i++)
43
- {
44
- aa.elements[i].checked = checked;
45
- }
46
- }
47
- </script>
48
- </head>
49
- <body>
50
- <p><span style="color:red; font-weight: bold;">WARNING</span>: This utility will OVERWRITE mpdf.php file in the current directory.</p>
51
- <p>Select the functions you wish to INCLUDE in your mpdf.php program. When you click generate, a new mpdf.php file will be written to the current directory.</p>
52
- <div><b>Notes</b>
53
- <ul>
54
- <li>HTML-CSS is required for many of the other functions to work including: Tables, Lists, Backgrounds, Forms, Border-radius and all other CSS</li>
55
- <li>DIRECTW includes the functions to Write directly to the PDF file e.g. Write, WriteText, WriteCell, Text, Shaded_box, AutosizeText</li>
56
- <li>You must include either HTML-CSS or DIRECTW</li>
57
- <li>JPG, PNG and JPG images are supported with IMAGES-CORE</li>
58
- <li>For WMF Images, you must include both IMAGES-CORE and IMAGES-WMF</li>
59
- <li>IMAGES-CORE are required for BACKGROUNDS (IMAGES) or WATERMARKS to work</li>
60
- </ul>
61
- </div>
62
- <input type="checkbox" name="checkall" onclick="checkedAll(frm1);"> <i>Select/Unselect All</i><br /><br />
63
-
64
- <form id="frm1" action="compress.php" method="POST">
65
- ';
66
- foreach($excl AS $k=>$ex) {
67
- echo '<input type="checkbox" value="1" name="inc['.$ex.']"';
68
- if ($k==0 || ($k > 1 && $k < 5)) {
69
- echo ' checked="checked"';
70
- }
71
- echo ' /> '.$ex.'<br />';
72
- }
73
-
74
- echo '<br />
75
- <input type="submit" name="generate" value="generate" />
76
- </form>
77
- </body>
78
- </html>';
79
- exit;
80
- }
81
-
82
- $inc = $_POST['inc'];
83
- if (is_array($inc) && count($inc)>0 ) {
84
- foreach($inc AS $i=>$v) {
85
- $key = array_search($i, $excl);
86
- unset($excl[$key]);
87
- }
88
- }
89
-
90
- if (!defined('PHP_VERSION_ID')) {
91
- $version = explode('.', PHP_VERSION);
92
- define('PHP_VERSION_ID', ($version[0] * 10000 + $version[1] * 100 + $version[2]));
93
- }
94
- if (PHP_VERSION_ID < 50300) { $mqr = @get_magic_quotes_runtime(); }
95
- else { $mqr=0; }
96
- if ($mqr) { set_magic_quotes_runtime(0); }
97
-
98
- $l = file('mpdf_source.php');
99
- if (!count($l)) { die("ERROR - Could not find mpdf_source.php file in current directory"); }
100
- $exclflags = array();
101
- $x = '';
102
-
103
- // Excluding 'HTML-CSS' will also exclude: 'TABLES', 'LISTS', 'TABLES-ADVANCED-BORDERS', 'HTMLHEADERS-FOOTERS', 'FORMS', 'BACKGROUNDS', 'CSS-FLOAT', 'CSS-IMAGE-FLOAT', 'CSS-POSITION', 'CSS-PAGE', 'BORDER-RADIUS'
104
- if ($excl[0]=='HTML-CSS') {
105
- $excl[] = 'TABLES';
106
- $excl[] = 'LISTS';
107
- $excl[] = 'TABLES-ADVANCED-BORDERS';
108
- $excl[] = 'HTMLHEADERS-FOOTERS';
109
- $excl[] = 'FORMS';
110
- $excl[] = 'BACKGROUNDS';
111
- $excl[] = 'CSS-FLOAT';
112
- $excl[] = 'CSS-IMAGE-FLOAT';
113
- $excl[] = 'CSS-POSITION';
114
- $excl[] = 'CSS-PAGE';
115
- $excl[] = 'BORDER-RADIUS';
116
- }
117
- $excl = array_unique($excl);
118
-
119
- foreach($l AS $k=>$ln) {
120
- $exclude = false;
121
- // *XXXXX*
122
- preg_match_all("/\/\/ \*([A-Za-z\-]+)\*/", $ln, $m);
123
- foreach($m[1] AS $mm) {
124
- if (in_array($mm, $excl)) {
125
- $exclude = true;
126
- }
127
- }
128
- /*-- XXXXX --*/
129
- preg_match_all("/\/\*-- ([A-Za-z\-]+) --\*\//", $ln, $m);
130
- foreach($m[1] AS $mm) {
131
- if (in_array($mm, $excl)) {
132
- $exclflags[$mm] = true;
133
- }
134
- $exclude = true;
135
- }
136
- $exclflags = array_unique($exclflags);
137
- /*-- END XXXX --*/
138
- preg_match_all("/\/\*-- END ([A-Za-z\-]+) --\*\//", $ln, $m);
139
- foreach($m[1] AS $mm) {
140
- if (in_array($mm, $excl)) {
141
- unset($exclflags[$mm]);
142
- }
143
- $exclude = true;
144
- }
145
- if (count($exclflags)==0 && !$exclude) {
146
- $x .= $ln;
147
- }
148
- }
149
- // mPDF 5.0
150
- if (function_exists('file_put_contents')) {
151
- $check = file_put_contents('mpdf.php', $x);
152
- }
153
- else {
154
- $f=fopen('mpdf.php', 'w');
155
- $check = fwrite($f, $x);
156
- fclose($f);
157
- }
158
- if (!$check) { die("ERROR - Could not write to mpdf.php file. Are permissions correctly set?"); }
159
- echo '<p><b>mPDF file generated successfully!</b></p>';
160
- echo '<div>mPDF file size '.number_format((strlen($x)/1024)).' kB</div>';
161
-
162
- unset($l);
163
- unset($x);
164
-
165
- include('mpdf.php');
166
- $mpdf = new mPDF();
167
-
168
- echo '<div>Memory usage on loading mPDF class '.number_format((memory_get_usage(true)/(1024*1024)),2).' MB</div>';
169
-
170
- exit;
171
-
172
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
pdf.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Gravity PDF
5
  * Plugin URI: https://gravitypdf.com
6
  * Description: Gravity PDF allows you to save/view/download a PDF from the front- and back-end, and automate PDF creation on form submission. Our Business Plus package also allows you to overlay field onto an existing PDF.
7
- * Version: 3.7.6
8
  * Author: Blue Liquid Designs
9
  * Author URI: http://www.blueliquiddesigns.com.au
10
  */
@@ -41,7 +41,7 @@
41
  /*
42
  * Define our constants
43
  */
44
- define('PDF_EXTENDED_VERSION', '3.7.6');
45
  define('GF_PDF_EXTENDED_SUPPORTED_VERSION', '1.8');
46
  define('GF_PDF_EXTENDED_WP_SUPPORTED_VERSION', '3.9');
47
  define('GF_PDF_EXTENDED_PHP_SUPPORTED_VERSION', '5');
4
  * Plugin Name: Gravity PDF
5
  * Plugin URI: https://gravitypdf.com
6
  * Description: Gravity PDF allows you to save/view/download a PDF from the front- and back-end, and automate PDF creation on form submission. Our Business Plus package also allows you to overlay field onto an existing PDF.
7
+ * Version: 3.7.7
8
  * Author: Blue Liquid Designs
9
  * Author URI: http://www.blueliquiddesigns.com.au
10
  */
41
  /*
42
  * Define our constants
43
  */
44
+ define('PDF_EXTENDED_VERSION', '3.7.7');
45
  define('GF_PDF_EXTENDED_SUPPORTED_VERSION', '1.8');
46
  define('GF_PDF_EXTENDED_WP_SUPPORTED_VERSION', '3.9');
47
  define('GF_PDF_EXTENDED_PHP_SUPPORTED_VERSION', '5');
view/templates/settings/changelog.php CHANGED
@@ -40,6 +40,12 @@
40
  <p><strong>Current Version: <?php echo PDF_EXTENDED_VERSION; ?></strong></p>
41
 
42
  <h3><?php echo PDF_EXTENDED_VERSION; ?></h3>
 
 
 
 
 
 
43
  <ul>
44
  <li>Bug - Added full support for all Gravity Forms notification events (includes Payment Complete, Payment Refund, Payment Failed, Payment Pending ect)</li>
45
  <li>Bug - Resolve mPDF PHP7 image parsing error due to a change in variable order parsing.</li>
40
  <p><strong>Current Version: <?php echo PDF_EXTENDED_VERSION; ?></strong></p>
41
 
42
  <h3><?php echo PDF_EXTENDED_VERSION; ?></h3>
43
+ <ul>
44
+ <li>Bug - Ensure 'gfpdf_post_pdf_save' action gets triggered for all PDFs when resending notifications</li>
45
+ <li>Housekeeping - Remove compress.php from mPDF package (unneeded)</li>
46
+ </ul>
47
+
48
+ <h3>3.7.6</h3>
49
  <ul>
50
  <li>Bug - Added full support for all Gravity Forms notification events (includes Payment Complete, Payment Refund, Payment Failed, Payment Pending ect)</li>
51
  <li>Bug - Resolve mPDF PHP7 image parsing error due to a change in variable order parsing.</li>