ReactJS Component for "Document Cloud View SDK"

New Here ,
Jan 30, 2020 Jan 30, 2020

Copy link to clipboard

Copied

Is there a React component available to consume the AdobeDC viewer. I am working on a SPA developed in ReactJS and wanted to try this out. I have currently implemented it by loading the script programatically and then used the script code as in demo. Is there a cleaner way ? 

 

Thanks!

TOPICS
How to

Views

2.5K

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 ,
Feb 04, 2020 Feb 04, 2020

Copy link to clipboard

Copied

Adding to above, even if i load the script " https://documentcloud.adobe.com/view-sdk/main.js" programmatically still react gives me an error on line -

var adobeDCView = new AdobeDC.View({ clientId: this.state.clientIDdivId: "adobe-dc-view" });
 

" error 'AdobeDC' is not defined "

 

Thanks!

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
Community Beginner ,
Feb 12, 2020 Feb 12, 2020

Copy link to clipboard

Copied

set this on windows as below :
window.AdobeDC = AdobeDC; 
and now you can use this on your component.

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 Employee ,
Feb 14, 2020 Feb 14, 2020

Copy link to clipboard

Copied

Thank you for using Adobe DC View SDK. We are working on building sample applications for consuming View SDK from variety of JS frameworks such as Angular and React. You should expect it to be available within next few months.

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 ,
May 11, 2020 May 11, 2020

Copy link to clipboard

Copied

Is there any advance on this?

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 Employee ,
May 12, 2020 May 12, 2020

Copy link to clipboard

Copied

The sample apps for React and Angular shall be available this month. 
Please look out for updates in this repo: https://github.com/adobe/dc-view-sdk-samples

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 ,
Jul 20, 2020 Jul 20, 2020

Copy link to clipboard

Copied

Trying to run the LocalPDFFilePreview example, but I keep getting a blank screen anytime I try to load a pdf. I got the same issue when I tried to create a sample project -

https://github.com/vivekrao1985/adobe-challenge

 

In the PDFLoader module I'm just passing the same sample file used in the examples.

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 ,
Jul 20, 2020 Jul 20, 2020

Copy link to clipboard

Copied

I traced the problem to here - https://github.com/adobe/pdf-embed-api-samples/blob/master/More%20Samples/React%20Samples/src/sample...

 

For some reason that Promise never resolves. ready() always returns a pending Promise so the pdf file never loads.

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 Employee ,
Jul 22, 2020 Jul 22, 2020

Copy link to clipboard

Copied

LATEST

Hi Vivek,

Thank you for trying out PDF Embed API. Noticed that the Embed API JavaScript (main.js) is missing in your sample project.

Please see this for example:- https://github.com/adobe/pdf-embed-api-samples/blob/master/More%20Samples/React%20Samples/public/ind...

Also, sharing the link to the official documentation just in case you wish to take a look.

 

Please try this out and let us know if you still face any issue. Hope this helps!

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 ,
Feb 20, 2020 Feb 20, 2020

Copy link to clipboard

Copied

This is exactly why I chose to learn React over Angular or Vue. I want to make mobile apps, but also need a good JS framework for my web development career, and they just go together so well.

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
Resources