Skip to main content
Participant
March 23, 2023
Answered

Oddity when using the PDF embed API

  • March 23, 2023
  • 1 reply
  • 1085 views

Hi!

I am using the PDF embed API on a website and have noticed some odd behaviour on at least one of the pages were I am using it.

Whenever somone goes to the page, apparently the PDF content doesn't load. But if yo then refresh the page it not loads the content correctly.

Have I messed up something or am I missing something? Very open to suggestions here.

The page is at: https://www.kd.dk/idepolitik/

This topic has been closed for replies.
Correct answer Raymond Camden

Ok, I _can_ see it. But I'm wondering if the other errors on the page are breaking things. Best I can suggest is to try to slim down the page and remove your other JS to see if that helps, and that may expose the conflict.

1 reply

Raymond Camden
Community Manager
Community Manager
March 24, 2023

I'm not seeing it at all. I do see an error in the console:

 

Looking at view source, I see you include the library, but I can't tell where you use the embed. 

 

Raymond Camden
Community Manager
Raymond CamdenCommunity ManagerCorrect answer
Community Manager
March 24, 2023

Ok, I _can_ see it. But I'm wondering if the other errors on the page are breaking things. Best I can suggest is to try to slim down the page and remove your other JS to see if that helps, and that may expose the conflict.

Raymond Camden
Community Manager
Community Manager
March 24, 2023

I got it to work by copying and pasting the code into the console. I think the issue may be that you are listening for adobe_dc_view_sdk.ready and it may have already fired. I'd suggest this. Look at my blog post here, https://medium.com/adobetech/tips-and-tricks-for-working-with-adobe-pdf-embed-and-services-ce685594b00e, and scroll down to this section, Adobe PDF Embed and Setup, and I detail how to handle this issue.