Bypass Password Dialog for protected files in PDF embed api
Hello,
Is there a way to bypass the password dialog when opening a password protected file.
Here is our use case, we are trying to render pdf to the client using the Adobe Embed API before sending them the pdf binary we applied watermarks onto it. For protected files, we let them enter the password first, then we do the watermarking from the severside and then send back the watermarked content.
We already asked from them the password and we just want to use it instead of asking them twice.
We already tried passing it on adobeDCView.previewFile parameter as the password, content.password, content.location.password and metaData.password but no luck.
document.addEventListener("adobe_dc_view_sdk.ready", function()
{
var adobeDCView = new AdobeDC.View({clientId: "<YOUR_CLIENT_ID>", divId: "adobe-dc-view"});
adobeDCView.previewFile(
{
content: {
location: {
url: "https://documentcloud.adobe.com/view-sdk-demo/PDFs/Bodea Brochure.pdf"}
},
password: "secret",
metaData: {fileName: "Bodea Brochure.pdf"}
});
});
Thanks,
