using ob_get_content(9 for TCPDF

How to use output buffering with TCPDF in ChronoForms v6.

Overview

The issue occurs when trying to adapt CFv5 code that uses `$form->data['file_pdf']` for output buffering, as the variable reference method has changed in CFv6.
In CFv6, use the placeholder `{var:custom_code32}` to access the buffered content, which is equivalent to the previous `$form->data['file_pdf']` method, ensuring proper integration with TCPDF.

Answered
ChronoForms v6
teldrive teldrive 22 Aug, 2019
Hi
I have used ob_start() in CFv5 without problems to avoid issues with php code in TCPDF module,
but in CFv6 i have not succeed changing $form->data['file_pdf'] by $this->data['file_pdf']
although when I define something like $this->data['date']=date('Y-m-d'); get registered as var without issues
I apreciate if someone can help me

ob_start();
<?php
..............my code
?>
$form->data['file_pdf'] = ob_get_contents();
ob_end_clean();
teldrive teldrive 23 Aug, 2019
Answer
oops
sorry I understood now the meaning of {var:custom_code32} is the same that data['file_pdf']; ?> in CFv5
its working perfect
This topic is locked and no more replies can be posted.