-
Notifications
You must be signed in to change notification settings - Fork 48
Description
Hello,
Am trying the example "print_from_pdf.php"
$pdf = "resources\document.pdf";
$connector = new NetworkPrintConnector("IP Address", 9100);
$printer = new Printer($connector);
try {
$pages = ImagickEscposImage::loadPdf($pdf);
foreach ($pages as $page) {
$printer -> graphics($page);
}
$printer -> cut();
} catch (Exception $e) {
/*
- loadPdf() throws exceptions if files or not found, or you don't have the
- imagick extension to read PDF's
*/
echo $e -> getMessage() . "\n";
} finally {
$printer -> close();
}
I have succesfully installed the imagick extension but I keep receiving the error:
Uncaught exception 'Exception' with message 'exception 'ImagickException' with message 'UnableToOpenBlob `resources\document.pdf': No such file or directory @ error/blob.c/OpenBlob/2702'
Which relates to file not being available but I have the file in said directory/folder. What could I be missing?
Am I suppose to edit anything on "ImagickEscposImage.php" to supply the pdf file?