mgufrone / pdf-to-html

PDF to HTML PHP Class using Poppler-Utils
MIT License
176 stars 89 forks source link

Using with Yii on localhost #19

Closed JfrankMainframere closed 8 years ago

JfrankMainframere commented 8 years ago

This is an example of some very basic code. I did combine some class files and make some minor adjustments to get it functioning on the Yii framework. `

         Yii::import('application.extensions.pdf2html.*');

         // change pdftohtml bin location
        Config::set('pdftohtml.bin', '/usr/local/bin/pdftohtml');

        // change pdfinfo bin location
       Config::set('pdfinfo.bin', '/usr/local/bin/pdfinfo'); 

          $pdf = "http://www.orimi.com/pdf-test.pdf";

         $pdf = new Pdf($pdf);

         //// convert to html string
         $html = $pdf->html();

         return $html;`

And I am getting this error. I did install poppler and verified the location with "which" but I am not sure what my issue is now. Thank you in advance this is the only thing that I think is going to work for what I am doing.

image

mgufrone commented 8 years ago

Hmmm, btw what is the webserver you're using? Apache?

JfrankMainframere commented 8 years ago

Yessir Apache/2.4.10 (Unix) OpenSSL/1.0.1j PHP/5.5.19 mod_perl/2.0.8-dev Perl/v5.16.3

JfrankMainframere commented 8 years ago

OMG I got it working! What a great great library. Thank you so much!