Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

reading PDF from local storage gives 401 error

Explorer ,
Jul 20, 2020 Jul 20, 2020

Hello:

I have PDF stored as blobs in local storage (indexed.db). When I read I get a 401 error in console.

 

 

 

var adobeDCView = new AdobeDC.View({ clientId: "xxxx", divId: 'pdf-content' });
adobeDCView.previewFile({
   content: { promise: store.get('test.pdf' },
      metaData: { fileName: "test.pdf" }
   },
   {
     embedMode: "SIZED_CONTAINER"
   });

 

 

 

I get a : ViewSDKInterface.js:1 POST https://viewlicense.adobe.io/viewsdklicense/jwt 401 (Unauthorized) error. I

 

 

 

3.5K
Translate
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

correct answers 1 Correct answer

Adobe Employee , Jul 22, 2020 Jul 22, 2020

You have to generate a client ID if you wish to use a web server. You can set the domain as localhost.

Please try creating credentials from https://www.adobe.io/apis/documentcloud/dcsdk/gettingstarted.html

Hope this helps.

 

Translate
Adobe Employee ,
Jul 22, 2020 Jul 22, 2020

Thank you for using PDF Embed API. The error seems to indicate that your webpage domain is not authorized to use the client ID configured in the code. Would be great if you could check and confirm if the client ID is used with the correct domain. 

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

Unfortunately I have not been able to set the credentials to localhost to test out the new API. And I cannot risk putting it in our production domain. So what would be a suitable solution? Thanks

Translate
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

You have to generate a client ID if you wish to use a web server. You can set the domain as localhost.

Please try creating credentials from https://www.adobe.io/apis/documentcloud/dcsdk/gettingstarted.html

Hope this helps.

 

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

Yes Sumona Ghosh it worked. Earlier I was trying to change an existing console project and it somehow prevented me from setting it. Thanks.

Translate
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 ,
Dec 06, 2020 Dec 06, 2020

not able to set domain localhost getting error.

what should i do? I want to run it on localhost:4200

 

Translate
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 ,
Dec 07, 2020 Dec 07, 2020
LATEST

Please try creating new credentials from here: https://www.adobe.io/apis/documentcloud/dcsdk/gettingstarted.html

 

You need to set the Application Domain as localhost. Hope this works.

Translate
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