PDF Rendering Suggestion

Topics: Developer Forum
Aug 13, 2013 at 1:46 AM
Why does PHPExcel use the file_exists and is_readable functions to check that the PDF library exists? Why not just rely on the require_once method to fail if the library does not exist?

The file_exists and is_readable functions do not use the include_path which means that even though a PDF library exists PHPExcel will refuse to use it unless you use explicit paths. I like to ensure my code is portable and therefore use relative paths however these checks prevent me doing this.

I think you should consider removing these redundant checks.

-Mark
Feb 27, 2014 at 2:50 AM
Hi there
Thanks for your great suggestion.There are many pdf library which supports to process pdf files.You said that the file_exists and is_readable functions do not use the include_path which means that even though a PDF library exists PHPExcel will refuse to use it unless you use explicit paths.That's indeed more convenient if there is a fine tool.