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

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

962

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

Community Expert , 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.

 

Protected.png

Votes

Translate

Translate
Community Expert ,
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

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
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-...

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
Community Expert ,
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.

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
Resources