silverstripe / cwp-pdfexport

Adds PDF export capability for CWP pages
BSD 3-Clause "New" or "Revised" License
4 stars 5 forks source link

ENH Do not show icon if binary is not available #30

Closed emteknetnz closed 1 year ago

emteknetnz commented 1 year ago

Issue https://github.com/silverstripeltd/product-issues/issues/613

Code is copied from https://github.com/silverstripe/cwp-pdfexport/blob/1.4/src/Extensions/PdfExportControllerExtension.php#L98

I didn't use a static helper function due to the use of $this->owner->config()->get('wkhtmltopdf_binary');

I think code duplication is fine in this context

emteknetnz commented 1 year ago

Have updated, now returns a 400 if the binary is missing when you visit the endpoint