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 ?
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 "
set this on windows as below :
window.AdobeDC = AdobeDC;
and now you can use this on your component.
Copy link to clipboard
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.
Is there any advance on this?
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 -
In the PDFLoader module I'm just passing the same sample file used in the examples.
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.
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!