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!
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 -
" error 'AdobeDC' is not defined "
Thanks!
Copy link to clipboard
Copied
set this on windows as below :
window.AdobeDC = AdobeDC;
and now you can use this on your component.
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.
Copy link to clipboard
Copied
Is there any advance on this?
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
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.
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.
Copy link to clipboard
Copied
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!
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.