Hello,
I tried to setup a custom button to use a custom function to create a pdf. It was working very well,
then I was trying to save the pdf file with this command:
$pdf->Output("/var/www/vhosts/.../uploads/test5.pdf", "F");
now I get one error message: TCPDF ERROR: Some data has already been output, can't send PDF file
from this point on the error never disapears. I can not make a PDF File,
my custom button/function does not work (with or without F or I): TCPDF ERROR:
the original button does not work with a template: TCPDF ERROR:
without template: TCPDF ERROR:
I removed the complete function: TCPDF ERROR:
with/without _settings.php: TCPDF ERROR:
logout/login, removing all templates and the function: TCPDF ERROR:
this is my function:
function dadabik_pdf(){
global $table_name, $dadabik_main_file;
require_once('include/tcpdf/tcpdf.php'); # I am not sure its necessary
$pdf = new TCPDF('P', 'mm', 'A4');
$pdf->AddPage();
$pdf->SetFont("helvetica","",12);
$pdf->Cell(50,50, "this is a pdf example 1", 0, 1, 'C', true);
$html = '<h1>HTML Example</h1>';
$pdf->writeHTML($html, true, false, true, false, '');
$pdf->Output("/var/www/vhosts/.../uploads/test5.pdf", "I");
header('Location:'.$dadabik_main_file.'?tablename='.urlencode($table_name).'&function=search');
}
Can someone help me please with this curious behaviour, thank you for your friendly help
best regards
Manuel
Copyright © 2001-2022 Eugenio Tacchini
Proudly ❤️ made in Emilia
dadabik.com
You are running the latest release of DaDaBIK
In case you want to upgrade to a more powerful edition (from Pro to Enterprise/Platinum, from Enterprise to Platinum) please contact us.
mysql version: 10.6.12-MariaDB-0ubuntu0.22.04.1
Web server: Apache
Client: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 OPR/95.0.0.0
I tried to setup a custom button to use a custom function to create a pdf. It was working very well,
then I was trying to save the pdf file with this command:
$pdf->Output("/var/www/vhosts/.../uploads/test5.pdf", "F");
now I get one error message: TCPDF ERROR: Some data has already been output, can't send PDF file
from this point on the error never disapears. I can not make a PDF File,
my custom button/function does not work (with or without F or I): TCPDF ERROR:
the original button does not work with a template: TCPDF ERROR:
without template: TCPDF ERROR:
I removed the complete function: TCPDF ERROR:
with/without _settings.php: TCPDF ERROR:
logout/login, removing all templates and the function: TCPDF ERROR:
this is my function:
function dadabik_pdf(){
global $table_name, $dadabik_main_file;
require_once('include/tcpdf/tcpdf.php'); # I am not sure its necessary
$pdf = new TCPDF('P', 'mm', 'A4');
$pdf->AddPage();
$pdf->SetFont("helvetica","",12);
$pdf->Cell(50,50, "this is a pdf example 1", 0, 1, 'C', true);
$html = '<h1>HTML Example</h1>';
$pdf->writeHTML($html, true, false, true, false, '');
$pdf->Output("/var/www/vhosts/.../uploads/test5.pdf", "I");
header('Location:'.$dadabik_main_file.'?tablename='.urlencode($table_name).'&function=search');
}
Can someone help me please with this curious behaviour, thank you for your friendly help
best regards
Manuel
About/upgrade
DaDaBIK™ is a product conceived and developed by Eugenio TacchiniCopyright © 2001-2022 Eugenio Tacchini
Proudly ❤️ made in Emilia
dadabik.com
Your current DaDaBIK version
You are using DaDaBIK version 11.8-Elba enterprise, installed on 10.02.2023 (installation code: 1865663e582dad9f52), the latest version of DaDaBIK is 11.8-Elba released on 05.12.2022You are running the latest release of DaDaBIK
In case you want to upgrade to a more powerful edition (from Pro to Enterprise/Platinum, from Enterprise to Platinum) please contact us.
System info
PHP Version: 8.1.16mysql version: 10.6.12-MariaDB-0ubuntu0.22.04.1
Web server: Apache
Client: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 OPR/95.0.0.0