• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Bypass Password Dialog for protected files in PDF embed api

Community Beginner ,
Sep 14, 2021 Sep 14, 2021

Copy link to clipboard

Copied

 

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,

Views

344

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 15, 2021 Sep 15, 2021

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 15, 2021 Sep 15, 2021

Copy link to clipboard

Copied

LATEST

I think your code amply demonstrated why this should not be a feature. Because the password is going to be there for the taking in the JavaScript code... but let me give you the link to the forum where the PDF Embed specialists hang out... https://community.adobe.com/t5/document-services-apis/ct-p/ct-Document-Cloud-SDK?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines