Skip to content

Adds compatibility for Ghostscript >=9.50.0 #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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