How to view password protected PDF using embedded library

New Here ,
Jan 19, 2021 Jan 19, 2021

Copy link to clipboard

Copied

I am able to view PDF using the "view-sdk" or embedded pdf viewer library (not sure of the name).  However when I try to load a password protected PDF, it displays nothing on the page and does not prompt for password.  Is there a way to view password protected PDF's using the embedded api?

 

 

TOPICS
How to, PDF Embed API

Views

109

Likes

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

correct answers 1 Correct Answer

Adobe Community Professional , Jan 20, 2021 Jan 20, 2021
Embed API supports viewing password-protected PDF and you should see an on-screen prompt to enter the password. See image below. Also, please share your code and the PDF in question so we can further diagnose the issue.

Likes

Translate

Translate
Adobe Community Professional ,
Jan 20, 2021 Jan 20, 2021

Copy link to clipboard

Copied

Embed API supports viewing password-protected PDF and you should see an on-screen prompt to enter the password. See image below. Also, please share your code and the PDF in question so we can further diagnose the issue.

 

Protected.png

Likes

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
New Here ,
Jan 20, 2021 Jan 20, 2021

Copy link to clipboard

Copied

I figured out that it was because we were hiding the pdf div until APP_RENDERING_DONE event was fired.  We were doing that technique in order to prevent the layered rendering effect that we were seeing.  

 

Do you know of a way to modify this code pen to work with password protected files too?  https://community.adobe.com/t5/document-services-apis/how-to-preload-pdf-to-avoid-layered-rendering-...

Likes

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
Adobe Community Professional ,
Jan 20, 2021 Jan 20, 2021

Copy link to clipboard

Copied

LATEST

Yeah - Without the password, rendering will never even start. Unfortunately, there is no way to pass a password to Embed API. You won't be able to prevent the layered rendering but you can probably throw a <div> over it to prevent mouse clicks until rendering is done.

Likes

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