imalhasaranga / PDFLib

Current Release provide you methods to convert PDF to Images as well as Images to PDF, future releases will included more functions to interact with PDF files
MIT License
58 stars 37 forks source link

GhostScript 9 compatibility #5

Open arildm opened 6 years ago

arildm commented 6 years ago

I tested this with GS 9.00 and it works fine in my case:

  $pdflib = new PDFLib();
  $pdflib->setPdfPath($pdf_realpath);
  $pdflib->setOutputPath($img_realpath);
  $pdflib->setDPI(150);
  $pdflib->convert();

Is there a specific need for the 9.16 version guard?

imalhasaranga commented 6 years ago

hmm, i'm not sure why I put that... but if you can run the tests against 9.0 and if all of them passes please create a pull request

arildm commented 6 years ago

Actually, it looks like it doesn't work as expected here after all ;) Could be because of the version difference. I'll look into it within a few weeks.

imalhasaranga commented 6 years ago

Great... I would be really happy if you keep me posted 👍

anotherbird commented 6 years ago

not working.. :(

Exception information:
Date: Oct 27, 2017 14:29PM
Message: Your version of GhostScript 9.1 is not compatible with the library
Code: 403
File: /home/vagrant/project.dev/vendor/imal-h/pdf-box/src/PDFLib.php
Line: 64
imalhasaranga commented 6 years ago

@anotherbird at the moment PDFLib requires Ghostscript version >= 9.16