php - How to load and view contents of pdf file in zend framework? -
i'm trying load pdf document contains text , images, want view selected contents document ( apply regex later). far progress, not i'm getting error (message: can not open 'desktop\test.pdf' file reading.), please help.
<?php $filename = 'desktop\test.pdf'; $pdf = zend_pdf::load($filename); ?>
just try below 1 of them sure work you
method 1: binary string outside of zend_pdf
$file = file_get_contents('path/to/file.pdf') $pdf = new zend_pdf($file);
method 2: set $load parameter true
$pdf = new zend_pdf('path/to/file.pdf', null, true);
method 3: use static load-method
$pdf = zend_pdf::load('path/to/file.pdf');
try give correct path every time might absulute path work or relative may be.
Comments
Post a Comment