Here is a quick guide on how to setup our Gravity PDF integration add-on (still in beta) and generate beautiful charts inside the PDF attached in email notifications. You can quickly test it here.
0 – Install PhantomJS and CasperJS on your server
At the moment, it is not possible to embed those libs inside the plugin, so you have to make sure it is installed on your server. For instance, install PhantomJS on Ubuntu 16.
If not detected automatically by our plugin, you will have to go the the plugin settings page and set it manually:
1 – Install plugins
Make sure you have installed and activated both plugins:
Upload
MaxiCharts Gravity PDF add-on is quite a big zip file, and most web servers configurations won’t let you upload such a big file through your WordPress backend plugin upload form. You will then need either to
- increase
upload_max_filesize
value insidephp.ini
file, if you have access to it - use a dedicated plugin to allow upload of very big plugins
- else you need to upload this zip file manually using an FTP client (we recommand free FileZilla client) to the /wp-content/plugins directory on your web server.
Install on server
- Unzip the plugin files.
- All plugins downloaded from the Plugin Directory are in the Zip format. Most operating systems (Windows, Mac, and so on) have built-in tools to open Zip files. After opening the Zip file, extract the directory contained inside the Zip file and put it in a directory on your computer that is easily accessible.
- Connect to your site’s server using FTP.
- If you have any difficulty connecting to your server, contact your hosting provider and ask for assistance in connecting to your server via FTP.
- Navigate to the
wp-content
folder within the WordPress installation for your website or blog. - The location of your WordPress installation can differ with every hosting provider. Make sure that you know the location before you proceed.
- Navigate to the
/wp-content/plugins
directory. - First, navigate to
wp-content
. Inside this directory are the plugins and themes directories along with a few others. Navigate to theplugins
directory. It is inside this directory that all plugins reside. - Upload the plugin folder to the
/wp-content/plugins
directory on your web server. This may take a while as the plugin contains quite a lot of files - The plugin folder, named for the plugin (for example, the folder is
/maxicharts-pdf-add-on
here) contains all the files for that plugin. - Go to the Dashboard’s Plugins page and you see the new plugin listed. If a mistake is made, delete all the newly uploaded files and begin again.
- Activate the plugin
Check server permissions
Make sure the whole plugin directory is owned by the web server user, for example with Apache on Ubuntu:chown -R www-data:www-data maxicharts-pdf-add-on/
Make also sure that casperjs is executable by launching the command:chmod +x maxicharts-pdf-add-on/node_modules/casperjs/bin/*
2 – Create a Gravity form or modify an existing one
3 – Insert a hidden (or text) field and set its value to a MaxiCharts shortcode
What’s great is that you can insert any MaxiCharts shortcode, even one charting another form entries 🙂
Create field

Set shortcode as Default Value

4 – Enable at least one notification
in order for the plugin to attach the PDF file of the form with the chart you need
5 – Gravity PDF configuration
Make sure core fonts installed
Enable at least one PDF
And do not forget to associate it with the notification of your choice. See Gravity PDF documentation for further explanations.
That’s all!
Include your Gravity form as you would for any form in any post or page and you are ready to go !
Comments (19)
Hi. Just installed this and it breaks our site (sure it’s a template thing as it works with the general WordPress themes but none of the premium ones Ive tested). The chart doesn’t print into the PDF, only the shortcode. It would be great to see if we can get this working. Happy to send over any details that you need.
D
Thanks a lot for your feedback, can you please send the log file located under maxicharts/logs/
Please use the contact form for this
I’m getting “No data from data source gf” in the HTML (got an X image on PDF). The same shortcode on a page displays the charts fine.
2019-03-27 03:37:41,683 GF INFO ***/wp-content/plugins/maxicharts-gravity-forms-source-add-on/mcharts_gf_source_add_on.php:1397 Process source gf
2019-03-27 03:37:41,684 GF INFO ***/wp-content/plugins/maxicharts-gravity-forms-source-add-on/mcharts_gf_source_add_on.php:1533 Get DATAS from GF source gf
2019-03-27 03:37:41,684 GF INFO ***/wp-content/plugins/maxicharts-gravity-forms-source-add-on/mcharts_gf_source_add_on.php:1663 maxicharts_gravity_forms returns 0 report fields
2019-03-27 03:37:41,685 MAXICHARTS WARN ***/wp-content/plugins/maxicharts/maxicharts.php:750 No data from data source gf
Kindly assist
Hi,
The shortcode inside the PDF will work exactly the same as on a wordpress page, so please first test your shortcode as usual on any post or page. If it says “No data from data source gf”, it means it cannot find any data matching your shortcode parameters, can you please provide a link to the page and the shortcode used ? Cheers
Thanks again.
Could I confirm that PhantomJS is a must-install for this to work?
I have a dev server with PhantomJS installed and am getting the same issue as David1 (shortcode printed on PDF) and another test server without PhantomJS but with an X on the PDF. Both shortcodes work on normal embed pages.
Ok thanks for your feedback safehouse, the X you can see confirms the image of the chart has not been created at all : probably PhantomJs not installed, you are right.
If the shortcode stays the same (not interpreted), that’s different, can you confirm the plugin is installed and activated ? Else please run the test and send us you log file via the contact form : https://maxicharts.com/change-maxicharts-log-level/
Yes, I can confirm all 3 plugins are installed and activated. I will do another test PDF on the staging site with PhantomJS installed with the log on debug mode, and send that across. This would be a great tool if PhantomJS wasn’t required though!
Ok, yes phantomjs is required on the server at the moment but won’t be in the future. Thanks for your feedback.
cannot ativate plugin. it show
Parse error: syntax error, unexpected ‘__FILE__’ (T_FILE) in /home/pr7/domains/csrcpall.com/public_html/po/wp-content/plugins/maxicharts-gravity-pdf-add-on/maxicharts-gravity-pdf-add-on.php on line 392
Which version of the plugin are you using, please use contact form to send us the log file after your test: https://maxicharts.com/change-maxicharts-log-level/
Thanks
gravity pdf 5.1.5
wp 5.2.2
Gravity Forms 4.13
Having same issue as TKUNG
Parse error: syntax error, unexpected ‘__FILE__’ (T_FILE) in /home/content/xxxxxx/wp-content/plugins/maxicharts-gravity-pdf-add-on/maxicharts-gravity-pdf-add-on.php on line 392
WP ver 5.2.2
Maxi ver 1.4.8 – I see 1.4.10 available but says only tested to 5.1.1
Which version of maxicharts gravity pdf add on ?
gravity pdf 5.1.5
wp 5.2.2
Gravity Forms 4.13
Using MaxiCharts Gravity PDF Add-on Version 1.2.1.21
Can you try with latest build please?
https://www.maxicharts.com/wp-content/uploads/gravity-pdf-add-on-delivery/maxicharts-gravity-pdf-add-on.zip