Copy link to clipboard
Copied
Hi.
When I open a incognito page the pdf doesn't show at the first time.
Taking a look at the DOM, The iframe is not loaded (just the first time), just the div that supuse to have the iframe is there.
https://i.gyazo.com/c3083ef381a2391fe104a1c60f6c05b3.png
I checked the Network tab and Console tab on the web dev tools but is not showing me any error.
I set up the event called "APP_RENDERING_FAILED" but isn't catching nothing.
https://i.gyazo.com/cbc6e4736a73d8b641db77818cf0e5bb.png
Exist a event to know if the Pdf had troubles and a way to init the "render" again?
You can check the PDF Embed API initialization in the following way as well
if (window.AdobeDC) {
previewFile();
} else {
/* Wait for Adobe Document Services PDF Embed API to be ready */
document.addEventListener("adobe_dc_view_sdk.ready", () => {
previewFile();
});
}
Hope this will help your cause.
Copy link to clipboard
Copied
Can you share your code?
Copy link to clipboard
Copied
This is whole my implementation.
https://i.gyazo.com/52b0428f4ac7b587ee4480513078598a.png
It only fails the first time.
Thank you
Copy link to clipboard
Copied
Put everything you have inside a document.ready event callback. I suspect the Embed API is ready before the HTML is fully loaded and it can't find the div you reference.
Copy link to clipboard
Copied
Hi Joel
Thank you so much for the support.
That makes sense to me.
I did it but Now the listener "adobe_dc_view_sdk.ready" is not being trigered anymore.
See my gif.
https://i.gyazo.com/394d21b04efc073ce2c2708f4acf6e2f.gif
I have not console errors that could obstruct the flow.
I will wait for you response.
Thank you.
Copy link to clipboard
Copied
The video is too small for me to see. Can you try recapturing it?
Copy link to clipboard
Copied
This is the same gif but with better quality.
Copy link to clipboard
Copied
If you want I cant share you by private my QA enviroment where i have implemented my code.
That works for you?
Copy link to clipboard
Copied
You can check the PDF Embed API initialization in the following way as well
if (window.AdobeDC) {
previewFile();
} else {
/* Wait for Adobe Document Services PDF Embed API to be ready */
document.addEventListener("adobe_dc_view_sdk.ready", () => {
previewFile();
});
}
Hope this will help your cause.
Copy link to clipboard
Copied
It works.
Thank you so much.