Skip to main content
daniels48252560
Participant
November 18, 2022
Question

Error using PDF Embed API on Ionic Capacitor

  • November 18, 2022
  • 1 reply
  • 1050 views

Trying to integrate this with my Ionic Capacitor iOS app, and receiving the following error "This application domain (capacitor://localhost) is not authorized to use the provided PDF Embed API Client ID." - When running ionic through my browser (localhost:8100) it displays the PDF file perfect, but when testing on an iOS device I am seeing the File preview not available error. My client ID domain is setup as localhost, but i cannot set the domain to capacitor://localhost - Any suggestions?

This topic has been closed for replies.

1 reply

Joel Geraci
Community Expert
Community Expert
November 18, 2022

Embed API is only supported within browsers. I wouldn't expect it to run in a Capacitor app.

daniels48252560
Participant
November 29, 2022

In my scenario I can easily view the PDF via the embed API on the tablet (for 2-3 seconds), and then the error appears - is there no plan for Adobe to accommodate Ionic/Capacitor so we could embed PDF's on mobile devices/tablets? Seems like a relatively simple fix could allow you to add "capacitor://localhost" as the authorized domain as it is acting in the same capacity as "localhost" which they are allowing.

Participant
May 4, 2023

I've been having the same problem. Did you manage to find a solution or are you still waiting for an update that allows the use of the API within Capacitor?