You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm struggling with the pdfjsLib. What I'm trying to do is to forcefully disable any Javascript present inside a pdf: all the pdf I'm going to show in the application I'm working in must be some kind of read-only file, preventing any possible code execution, even if benign.
I know that this might sound strange because "this could break the pdf" or something like that, but this was requested.
In the application, we are using the default viewer found in web/viewer.html, calling it using an url similar to web/viewer.html?file=my.pdf. I've found that there is the enableScripting variable which might help with my issue, however I've found it here https://github.com/mozilla/pdf.js/wiki/Viewer-options that it is not a valid parameter.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi all!
I'm struggling with the pdfjsLib. What I'm trying to do is to forcefully disable any Javascript present inside a pdf: all the pdf I'm going to show in the application I'm working in must be some kind of read-only file, preventing any possible code execution, even if benign.
I know that this might sound strange because "this could break the pdf" or something like that, but this was requested.
In the application, we are using the default viewer found in
web/viewer.html
, calling it using an url similar toweb/viewer.html?file=my.pdf
. I've found that there is theenableScripting
variable which might help with my issue, however I've found it here https://github.com/mozilla/pdf.js/wiki/Viewer-options that it is not a valid parameter.In the main script of the application, I've added
This doesn't seem to trigger the warning that should pop out (like discussed here #16158).
How can I achive my goal?
Many thanks!!
Beta Was this translation helpful? Give feedback.
All reactions