Jake Jackson
Forum Replies Created
-
Forum: Plugins
In reply to: [Gravity PDF] Signed URL IssueHi @nnproducts,
Thanks for providing so much information about the issue you are having.
The signing token used for verification is stored in the database, so I wouldn’t think that’s the cause of the problem. The two most common reasons the validation fails is:
- The Home URL / Site URL setting in WordPress is configured with the
https://
protocol, however another plugin like Really Simple SSL is forcing HTTPS. The fix is to update your Home URL / Site URL tohttps://
. Once done, complete a new form submission and verify the new signed link works (note: the old links generated before this change still won’t work). - The PHP application is behind a reverse proxy that terminates HTTPS, and because of that PHP’s
$_SERVER['HTTPS']
superglobal isn’t being set toon
. If that’s the case, you’ll need to manually set this value in your wp-config.php file.
If you aren’t affected by the above, on rare occasions another WordPress plugin or a reverse proxy (like Cloudflare) manipulates the URL prior to the verification process occurring. This is difficult to pinpoint what causes the conflict, but I’d start by checking if you are affected by this problem.
You can test for this by adding the following code to your production site, setting WP_DEBUG_LOG to true, replicating the issue, and then inspecting the debug.log file:
add_filter( 'gfpdf_pdf_middleware', function ( $error, $entry, $settings ) {
$protocol = isset( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] === 'on' ? 'https://' : 'https://';
$domain = $_SERVER['HTTP_HOST'];
$request = $_SERVER['REQUEST_URI'];
$url = esc_url_raw( $protocol . $domain . $request );
// log the signed URL
error_log( sprintf( 'PDF Signing Request: %s', $url ) );
return $error;
}, 10, 3 );Compare the URL being logged to the one generated by Gravity PDF on your confirmation page. They are suppose to exactly match. If they don’t match (and it’s not because of the protocol), the next step is to rule out plugin/theme conflicts. Follow this guide to complete this test: https://docs.gravityforms.com/testing-theme-plugin-conflict/
Let me know how all these checks go. ??
Forum: Plugins
In reply to: [Gravity PDF] CSS : External StylesheetGlad you were able to find a solution @corrinarusso.
The PDF engine Gravity PDF uses supports the loading of stylesheets over HTTP(S) or loading directly form the file system. The latter option is faster, as it’s one less network request to make:
<!-- Load stylesheet over the internet (slower) -->
<link rel="stylesheet" />
<!-- Use a relative path loads the stylesheet over the internet (slower) -->
<link rel="stylesheet" href="/wp-content/uploads/PDF_EXTENDED_TEMPLATES/my-stylesheet.css" />
<!-- Load stylesheet directly from the server (faster) -->
<link rel="stylesheet" href="<?php echo esc_attr( __DIR__ . '/my-stylesheet.css' )" />If you still need PHP in the stylesheet file so you can conditionally apply CSS based on form data, you can always
include
the PHP file:<style>
<?php include __DIR__ . '/my-stylesheet.php'; ?>
</style>For anyone else interested in this topic, this code goes in your custom PDF template.
- This reply was modified 4 months, 2 weeks ago by Jake Jackson. Reason: Include example of loading the stylesheet with a relative path, which still uses a network request
Forum: Plugins
In reply to: [Gravity PDF] Gravity Form Submit IssueHi @muhammad_omer,
Please refer to our documentation on how you can debug this issue: https://docs.gravitypdf.com/v6/users/500-internal-server-error
If you aren’t sure how to fix the errors you uncover while running these checks, please let me know what these errors are and I’ll point you in the right direction.
Thank you.
Forum: Plugins
In reply to: [Gravity PDF] MalwareMalware report likely false positive, so marking topic as resolved. Feel free to provide additional information about the specific code flagged as malware and we will investigate further. ??
Forum: Plugins
In reply to: [Gravity PDF] Default SecurityHey @nnproducts,
Thanks so much for those kind words!
If a signed PDF URL expires, Gravity PDF does indeed fallback to the default security protocols for authentication. We use the auth_redirect() function to display the WP login page when necessary. It looks like you could use the login_url filter to change where someone ends up when the redirect occurs.
Forum: Plugins
In reply to: [Gravity PDF] Link in new windowHi @nitrat,
In short, you cannot reliably ensure links inside PDFs are opened in a new window. PDF documents are not web pages and how links are handled is up to the PDF viewer software. If this change is for your personal use, you may be able to edit the preferences for your PDF viewer software of choice. Do a search on how you might do so.
Forum: Reviews
In reply to: [Gravity PDF] Perfect supportReally appreciate the review, @henrietteklindt. Happy PDFing!
Forum: Reviews
In reply to: [Gravity PDF] Exceptional Support!Thanks so much for the kind words. Happy PDFing!
Forum: Plugins
In reply to: [Gravity PDF] FunctionalityHi @sherry22,
Here’s a short video that provides an overview of how Gravity Forms merge tags work: https://www.gravityforms.com/video/merge-tags/. And here’s Gravity Forms documentation about merge tags: https://docs.gravityforms.com/field-merge-tags/
If you have entered
{Name (Last):2.6} {Name (First):2.3} PDF
into the PDF Filename setting, that means the last name and first name from a Name field with an ID of 2 will replace those two tags e.g.Jake Jackson PDF.pdf
. If field ID 2 does not exist, is not a Name field, or has been left blank, the PDF filename will bePDF.pdf
instead.Experiment with different merge tags to get the optimal filename you’d like for your PDF. Should you have additional questions or problems with the PDF Filename, it would be best to open a new support ticket.
Thanks!
Forum: Plugins
In reply to: [Gravity PDF] MalwareHi @calderwood,
Thank you for reaching out about this potential security issue.
mPDF is the library we use to generate the PDF documents. Since generating PDFs involves reading and writing at the binary and hexadecimal level in PHP, this type of code can create false-positives in security scanning software.
Did your security software provide the line number(s) of the malware it found in the
Mpdf.php
file? It contains over 25,000 lines of code, and I’d need to know the specific section of code that triggered the alert to identify if there is actually a security issue, or if this is another a false positive.Much appreciated.
Forum: Plugins
In reply to: [Gravity PDF] FunctionalityGreat to hear you’ve been able to resolve the email problem!
You can include Gravity Forms merge tags in the PDF Filename setting to make the document name unique for each entry. Including the
{entry_id}
merge tag is a simple way do this.Forum: Plugins
In reply to: [Gravity PDF] FunctionalityHi @sherry22,
If you deactivate Gravity PDF on your website, do you begin receiving Gravity Forms email notifications? If not, please refer to Gravity Forms notification troubleshooting guide.
If you get notifications with Gravity PDF deactivated, there’s likely a PDF-related issue to address. Reactivate the plugin and then:
- Run the Core Font Installer
- Try view a PDF from your Entry List admin page
- Try install and activate the WP Debugging plugin, then Preview your form and submit it. Any PHP errors should get displayed. Deactivate the WP Debugging plugin when finished testing.
Please let me know what issue(s) you find.
Forum: Plugins
In reply to: [Gravity PDF] FunctionalityHi @sherry22,
Yes, it certainly does. To send the PDF via email you will first need to have setup a Notification email on the form. You can then create (or edit) a PDF on that same form and enable the Notifications setting.
Forum: Plugins
In reply to: [Gravity PDF] Templates cannot be loadedHi @nitrat,
Thank you for the information.
The recommended manual deployment method for custom templates is via the PDF Template Manager, but the team will brainstorm ideas on how we can make it easy to flush the cache when using FTP or a File Manager to do the installation.
Forum: Plugins
In reply to: [Gravity PDF] FooterGlad you were able to fix the issue, @nitrat.
For anyone else who might have a similar problem, here’s the link to our documentation showing you how to define and show a custom header/footer: https://docs.gravitypdf.com/v6/developers/pdf-features/headers-and-footers
- The Home URL / Site URL setting in WordPress is configured with the