1
Explorer
,
/t5/acrobat-services-api-discussions/adobe-dc-view-sdk-ready/td-p/11621528
Nov 24, 2020
Nov 24, 2020
Copy link to clipboard
Copied
Is there some property that can be checked to see if the sdk is ready rather than listening for the event.
Would just checking for the existence of adobeDCView be enough?
Reason for this is because of the way our app is constructed the sdk gets loaded and completes before the code that attaches the listener, so it never hears the event.
Thanks
Rob
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
1 Correct answer
Adobe Employee
,
Dec 03, 2020
Dec 03, 2020
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();
});
}
Community Expert
,
/t5/acrobat-services-api-discussions/adobe-dc-view-sdk-ready/m-p/11622216#M899
Nov 24, 2020
Nov 24, 2020
Copy link to clipboard
Copied
You can't rewrite that section?
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Robert5DE7
AUTHOR
Explorer
,
/t5/acrobat-services-api-discussions/adobe-dc-view-sdk-ready/m-p/11622321#M900
Nov 24, 2020
Nov 24, 2020
Copy link to clipboard
Copied
Yeah I decided to rewrite it in the end and load the script dynamically in our PDFAdapter class.
Thanks
Rob
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Adobe Employee
,
LATEST
/t5/acrobat-services-api-discussions/adobe-dc-view-sdk-ready/m-p/11648022#M948
Dec 03, 2020
Dec 03, 2020
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();
});
}
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

