Copy link to clipboard
Copied
Help, we cannot seem to "print" to download PDF files now.
On Firefox browser, we solved this by adding:
"blob:"on multple CSP Directives depending on what the error says.
"object-src",
"frame-src"
But on Chrome, we got this error:
RuntimeError: Aborted(CompileError: WebAssembly.instantiate(): Refused to compile or instantiate WebAssembly module because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self' use.typekit.net assets.adobedtm.com www.adobe.com/marketingtech/ prod.adobeccstatic.com/utilnav/ widget.uservoice.com by2.uservoice.com/t2/ assets.adobe.com api.demandbase.com/api/v2/ip.json commerce.adobe.com"). Build with -sASSERTIONS for more info.
at abort (index.js:8:5302)
at index.js:8:1432623
Our setup:
Enable the "print" and "download" for comparison. Then try the "print" or Ctrl+P key shortcut.
var previewFilePromise = adobeDCView.previewFile(
// document config
{
content: {
location: {
url: url
}
},
metaData: {
fileName: file_name,
hasReadOnlyAccess: true,
},
},
// Viewer config
{
showAnnotationTools: false,
showDownloadPDF: true,
showDisabledSaveButton: false,
showPrintPDF: true
}
);
For now, we are searching if we could programmatically enable download if the user enters the "owner" password.
Thanks for the help in advance. 🙂
Copy link to clipboard
Copied
On Chrome, the demo is working.
Copy link to clipboard
Copied
So to be clear, our demo works, yours did not, right? Can you share an example online where we can see and verify?
Copy link to clipboard
Copied
Yes @Raymond Camden, the demo works. Maybe I will try to make a minimal setup then build up from there.
Sorry but we could not share an online example.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more