Skip to main content
daniels48252560
Participant
Nov 18, 2022 2:43 PM UTC
Question

Error using PDF Embed API on Ionic Capacitor

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 is closed to new replies. Start a new post to keep the conversation going.

3 replies

Joel Geraci
Community Expert
Community Expert
Nov 18, 2022 4:44 PM UTC

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

Translate
daniels48252560
Participant
Nov 29, 2022 4:49 PM UTC

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.

Translate
Participant
May 4, 2023 7:42 PM UTC

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?

Translate