Skip to content

Conversation

@ouun
Copy link

@ouun ouun commented Feb 11, 2021

This is so useful and still works with WP 5.6. However I had difficulties on a server with Ubuntu and Ghostscript 9.50.0. Just received the error Failed to generate the PDF preview.. Some debugging showed that the issue comes from Ghostscript and some reasearch clarified that since GhostScript 9.50 the SAFER mode has been turned ON by default, resulting in /invalidfileaccess errors.

This PR adds the WP upload path to the permitted reading list to solve /invalidfileaccess errors. However there would bee another solution to pass the sorce PDF path via --permit-file-read= but that requires some more changes in the plugin. So this is more a quick solution as the best solution.

See more: https://stackoverflow.com/a/61310729/1456459

This is so useful and still works with WP 5.6. However I had difficulties on a server with Ubuntu and Ghostscript 9.50.0. Just received the error `Failed to generate the PDF preview.`. So some debugging clartified that the issue came from Ghostscript. Some more reasearch clarified that since GhostScript 9.50 the SAFER mode has been turned ON by default, resulting in `/invalidfileaccess` errors.

This PR adds the WP upload path to the permitted reading list to solve `/invalidfileaccess` errors. However there would bee another solution to pass the sorce PDF path via `--permit-file-read=` but that requires some more changes in the plugin. So this is more a quick solution as the best solution.

See more: https://stackoverflow.com/a/61310729/1456459
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant