I have written code for printing report using mdf library in PHP as below:
include("..\mpdf\mpdf.php");
$mpdf=new mPDF('','A4');
$mpdf->WriteHTML($a);
$mpdf->SetJS('this.print();');
$mpdf->Output();
exit;
When I use this applicaiton, things go fine. I directly get print dialog box and there are no PHP warnings too. But when the same application is executed under PHPDesktop, it shows pdf save dialog instead of showing print dialog and also shows the warning:
session_start(): Cannot send session cache limiter - headers already sent
although I have already used the below code on the top of every php page:
OB_START();
if(session_status()!=PHP_SESSION_ACTIVE || session_status() == PHP_SESSION_NONE)
session_start();
I want to open the print dialog box in PHPDesktop also. Please provide some solution.
UPDATE
I have downloaded phpdesktop-chrome-57.0-rc-php-7.1.3 from Github. Also, I have downloaded php_printer.dll from Github. Version is php_printer-php5.6.30 I have placed the dll in every possible folder and also have added it as an extension to the php.ini file of PHPDesktop project directory. Now, it tries to show the preview but says: "Failed to load PDF document"