Encrypted PDF issue

Enable password protection for a CF-generated PDF.

Overview

The PDF plugin expects a string for password settings but receives an array, causing an error.
Modify the specified line in the plugin file to handle the array correctly, allowing password encryption to function.

Answered
mi millermulti 08 Jul, 2014
Answer
Hello,
A couple years ago you helped me out by creating the PDF plugin for Chronoforms. I have a new site with similar requirements, the ability to covert the form into an encrypted PDF which can then be emailed out. I see you have the PDF plugin available for V5, I have loaded it and performed a test with/without password protection. Without a password everything worked fine with password I received an error in tcpdf/tcpdf.php line 74. The issue is that the password settings are stored in an array. Your code is designed for a string which then errors out. I modified line 74 to be the following:

$perms = (count($config->get('permissions', "")) > 0) ? $config->get('permissions', "") : array();


This resolves the issue. Password protection works just fine after the change.

--Gary
Max_admin Max_admin 12 Jul, 2014
Thanks!🙂
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.