custom pdf template failed
-
Hello, after updating to version 2.X, the customized pdf template cannot show up.
use FluentForm\App\Services\FormBuilder\ShortCodeParser;
use FluentForm\Framework\Foundation\Application;
class certificate extends \FluentFormPdf\Classes\Templates\TemplateManager
{
public function __construct(Application $app)
{
parent::__construct($app);
}
public function getDefaultSettings() { return ['header' => '', 'footer' => '', 'body' => '']; }
public function getSettingsFields() { return array(); }
public function generatePdf($submissionId, $feed, $outPut = 'I', $fileName = '')
{
$submission = wpFluent()->table('fluentform_submissions')->where('id', $submissionId)->first();
$response = json_decode($submission->response, true);
$htmlBody = '
<div class="description">
test test test
</div>
';
if (!$fileName) {
$fileName = 'certificate -' . $submissionId;
}
return $this->pdfBuilder($fileName, $feed, $htmlBody, '', $outPut);
}
}error message as below
Uncaught Error: Class \”FluentFormPdf\Classes\Templates\TemplateManager\” not found in /var/www/wp-content/uploads/FLUENT_PDF_TEMPLATES/certificate.php on line 6″,”data”:{“message”:”Uncaught Error: Class \”FluentFormPdf\Classes\Templates\TemplateManager\” not found”,”file”:”/var/www/guide/event/wp-content/uploads/FLUENT_PDF_TEMPLATES/certificate.php”,”line”:6,”trace”:[{“file”:”/var/www/wp-content/plugins/insert-headers-and-footers/includes/class-wpcode-snippet-execute.php(419) : eval()’d code”,”line”:24,”function”:”include_once”}
But the code runs well in version 1.111
Thanks!
You must be logged in to reply to this topic.