Is it possible to set the resolution of a PDF file using the mPDF class. I am trying to save an image that is mostly black, but with some thin white lines, and I do not see these white lines in PDF, so I assume that I need to increase the resolution.
EDIT:
This is my code. First I save my page as html:
<?php $fileID = uniqid(); $_SESSION['fileID'] = $fileID; file_put_contents("$fileID.html", ob_get_contents()); header("Location: createPDF.php"); ?>
then I convert this page (which is full of svg images) to pdf:
<?php include 'MPDF57/mpdf.php'; session_start(); $fileID = $_SESSION['fileID']; $yourHtml = "$fileID.html"; $mpdf=new mPDF('', '', 0, '', 0, 0, 0, 0, 0, 0); $mpdf->SetDisplayMode('fullpage'); $mpdf->WriteHTML(file_get_contents('main.css'),1); $mpdf->WriteHTML(file_get_contents($yourHtml)); $mpdf->Output(); unlink($yourHtml); unset($_SESSION['fileID']); header("index.php"); exit; ?>
Now I need to know if there is a way to change the resolution of the PDF file.
source share