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

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -