ncjoes / office-converter

PHP Wrapper for LibreOffice
MIT License
208 stars 77 forks source link

Feedback - Bugs, Issues, Method #52

Closed gidzr closed 1 year ago

gidzr commented 1 year ago

Hey there

I appreciate all the work gone into this api wrapper, but honestly, given all the bugs and troubleshooting I've had to do, using a simple exec() command directly from php without this wrapper is way easier.

So unfortunately this api feels a little like using a horse to pull a car.

Would be great if you could simplify the backend so it does all the work of selecting the output formats, filters, validates inputs, and other options that come with libreoffice, and also to make it bulletproof so a) updates in php, and b) error types and troubleshooting are taken care by your api.

For example, my two biggest problems were: 1) that my libreOffice location in windows had a space because in windows, programs are stored in "Program Files".. Adding double quotes around the location path messed up everything because they weren't escaped. But I only figured this out using an exec() command directly and passing back the results. 2) PHP deprecated the use of null in realpath. Not sure why you are using realpath, because that also converts full paths to empty/null. You could simply check the inputs are absolute and if not, automatically find the fullpath prefix and add it using DIR or FILE

Anyway, my two cents worth.

Thanks and good luck