Skip to main content
Participating Frequently
February 2, 2023
Question

PDF Embed API modern viewer cannot open password-protected PDF

  • February 2, 2023
  • 1 reply
  • 3044 views

Hi,

 

I have been using PDF Embed API legacy viewer for a while now and it works great. After moving to the modern viewer, I found that it can no longer open password-protected PDFs. I had no problem opening password-protected PDFs with the legacy viewer. Is there something extra that must be done to enable support of password-protected PDFs in the modern viewer?

 

The modern viewer displays the password entry form, but it does not work even after entering the correct password:

My only option is to Cancel, after which I see this error on the page:

 

The version of PDF viewer is:

Application Version
3.1.3-3ac6701a

 

Would appreciate any help.

 

Thanks,

/Swee

    This topic has been closed for replies.

    1 reply

    Joel Geraci
    Community Expert
    Community Expert
    February 2, 2023

    I haven't been able to reproduce this. Password-protected files seem to open just fine for me. See the image below.

     

    Swee5C73Author
    Participating Frequently
    February 2, 2023

    Hi @Joel Geraci,

     

    Thank you for checking. For some reason, it does not work on my PC. I did not change anything else on my web app except to update the URL to load the new modern viewer.

     

    I used Chrome devtools to look at any errors that might be happening, and noticed that there are quite a number of exceptions/errors being thrown.

     

    Before I entered my password, there were already several errors related to rendering:

    Not sure why it is having trouble loading a GIF file:

    p.typekit.net/p.gif?s=1&k=bxf0ivf&ht=tk&h=documentservices.adobe.com&f=7180.7181.7182.7184.7185.22474&a=19707152&js=1.21.0&app=typekit&e=js&_=1675357999757:1 GET https://p.typekit.net/p.gif?s=1&k=bxf0ivf&ht=tk&h=documentservices.adobe.com&f=7180.7181.7182.7184.7185.22474&a=19707152&js=1.21.0&app=typekit&e=js&_=1675357999757 net::ERR_ADDRESS_INVALID

     

    and also uncaught exception:

    events.js:70 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'Producer')
    at trackProducerMetadata (events.js:70:11)
    at RenderingManager.trackAnalytics (RenderingManager.js:460:5)
    at RenderingManager._callee4$ (RenderingManager.js:585:10)
    at tryCatch (RenderingManager.js:2:1)
    at Generator.<anonymous> (RenderingManager.js:2:1)
    at Generator.next (RenderingManager.js:2:1)
    at RenderingManager_asyncGeneratorStep (RenderingManager.js:2:1)
    at _next (RenderingManager.js:2:1)

     

    After entering my password, these errors were thrown:

     

    Error
    at self.___cxa_throw (wasm_acrobat.js:1:160)
    at wasm_acrobat.wasm
    at wasm_acrobat.wasm
    at wasm_acrobat.wasm
    at wasm_acrobat.wasm
    at wasm_acrobat.wasm
    at wasm_acrobat.wasm
    at wasm_acrobat.wasm
    at wasm_acrobat.wasm
    at wasm_acrobat.wasm
    at wasm_acrobat.wasm
    at wasm_acrobat.wasm
    at wasm_acrobat.wasm
    at wasm_acrobat.wasm
    at wasm_acrobat.wasm
    at wasm_acrobat.wasm
    at wasm_acrobat.wasm
    at wasm_acrobat.wasm
    at wasm_acrobat.wasm
    at wasm_acrobat.wasm
    at wasm_acrobat.wasm
    at invoke_viii (wasm_acrobat.js:1:97499)
    at wasm_acrobat.wasm
    at wasm_acrobat.wasm
    at ccall (wasm_acrobat.js:1:78039)
    at wasm_acrobat.js:1:78348
    at pt (acrobatProxy.js:1:56978)
    at lt (acrobatProxy.js:1:59782)
    at dt (acrobatProxy.js:1:61936)
    at gt (acrobatProxy.js:1:61623)
    at acrobatProxy.js:1:61898

     

    It is possible that I am doing something wrong; maybe I did not initialize something, but I could not find any PDF Embed API documentation about extra setup required to support password-protected PDFs. Any help would be appreciated.

     

    /Swee

    Joel Geraci
    Community Expert
    Community Expert
    February 2, 2023

    Can you share the PDF?