PDF Embed API: is there any event that marks the start of display

Explorer ,
Sep 01, 2020 Sep 01, 2020

Copy link to clipboard

Copied

I am finding that after the `adobeDCView.previewFile` command is issued, it takes a while even before the gray loading icon appears. Is there any event available to capture the start of the loading? Reason being, we can superlay with our own loader while the embed code works. Thanks

TOPICS
PDF Embed API

Views

90

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Sep 01, 2020 Sep 01, 2020

Copy link to clipboard

Copied

APP_RENDERING_DONE fires when the PDF is rendered completely and the first page is displayed but you might also want to listen for APP_RENDERING_FAILED which will tell you if the PDF fails to render because of an unexpected error. 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 01, 2020 Sep 01, 2020

Copy link to clipboard

Copied

Shofiul Alam

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 01, 2020 Sep 01, 2020

Copy link to clipboard

Copied

Thanks Joel but I cannot seem to find its mention in the documentation (https://www.adobe.io/apis/documentcloud/dcsdk/docs.html). Or have I missed it? I see no examples of how the event gets triggered. It is via some catch block as part of the PreviewFile command? 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Sep 02, 2020 Sep 02, 2020

Copy link to clipboard

Copied

It's listed under "Basic Events" and there's an example of how to register the listener there too. You can register it immediately after creating the view Object.

https://www.adobe.com/devnet-docs/dcsdk_io/viewSDK/howtodata.html#basic-events

 

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 02, 2020 Sep 02, 2020

Copy link to clipboard

Copied

LATEST
Oops. Missed that. Thanks Joel

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines