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

File Preview Not Available. Domain Not Authorized

New Here ,
Jun 03, 2020 Jun 03, 2020

I successfully integrated on one site I manage for work with no issues, however on the other site I manage in a volunteer role I'm seeing the issue that the "File Preview is Not Available. This application domain (http://phadp.org) is not authorized to use the provided View SDK Client ID."

 

I've double checked the key and the domain I used when registering, but I cannot figure out why I continue to get this message.

 

Malkayah_0-1591206812286.png

http://phadp.org/?q=node/832

 

Any help would be appreciated. 

6.2K
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 ,
Jun 03, 2020 Jun 03, 2020

Hi Malkayah, Thanks for using View SDK, It is because you whitelisted API Key for domain www.phadp.org but you are trying to access your website by phadp.org domain.  


http://www.phadp.org/?q=node/832 This is working.

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 ,
Jun 03, 2020 Jun 03, 2020

Thanks for the reply. Is there a way to add both variations of the domain to the whitelist? Obviously I have no control over how end users chose to visit the 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
Adobe Employee ,
Jun 03, 2020 Jun 03, 2020

Please create the API key for "phadp.org" then it should work for both variations of the domain. 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 ,
Jun 03, 2020 Jun 03, 2020

I did as suggested, and it works for "phadp.org" but when I manually type "www.phadp.org" I get a different file preview error. This one does not saw it is not authorized, but says, "Please reload to try again". Reloading does nothing.

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 ,
Jun 03, 2020 Jun 03, 2020

Issues is occurring because of Cross-origin resource sharing (CORS) which says webpage and file location URL needs to be on the same domain. Example: webpage: https://example.com/viewer/test.html; PDF location: https://example.com/resources/abc.pdf)

In your case, it looks like you are passing the PDF URL as http://phadp.org/files/owoh/owoh24_2.pdfif you pass the File location URL relative to your domain like "/files/owoh/owoh24_2.pdf", then it should work in both cases.

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

That did the trick. 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
Community Beginner ,
Apr 10, 2021 Apr 10, 2021

Hello,

 

Can someone help me? I'm also facing the same problem.

I created a credential ID for my domain www.roundstudy.com using this Link

and then created a html code on live demo https://www.adobe.com/go/dcviewsdk_demo for my pdf that I uploaded from my local folder. I pasted that code on my iFrame 

 

HTML Code: <div id="adobe-dc-view"></div>
<script src="https://documentcloud.adobe.com/view-sdk/main.js"></script>
<script type="text/javascript">
document.addEventListener("adobe_dc_view_sdk.ready", function(){
var adobeDCView = new AdobeDC.View({clientId: "9f1b28edec7b42fcb3581a1a501373d9", divId: "adobe-dc-view"});
adobeDCView.previewFile({
content:{promise: "<FILE_BLOB_PROMISE>"},
metaData:{fileName: "<FILE_NAME>"}
}, {});
});
</script> 

 

credit id: 9f1b28edec7b42fcb3581a1a501373d9

Domain name: www.roundstudy.com.

 

but when I upload the code on my website there is an error: "File Preview is Not Available. This application domain (xxxxxxxxxxxxxxx) is not authorized to use the provided View SDK Client ID."

 

Am I following the right process? Could someone guide me through it

 

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
Community Beginner ,
Apr 10, 2021 Apr 10, 2021

Hi there, could you be more specific on where are you locating the pdf file, and in which url are embeding the script?

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
Community Beginner ,
Apr 10, 2021 Apr 10, 2021

I've located the file in my local drive. I don't know how to get the source url for the file. The url where I'm embeding the script is roundstudy.com

 

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
Community Beginner ,
Apr 10, 2021 Apr 10, 2021

Thats the problem, the pdf file should be on your website, or in any other site that you could host the pdf file. Also the url should be a direct link, that means that the pdf file will begin to download as soon as the moment you access to that url. 

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
Community Beginner ,
Apr 10, 2021 Apr 10, 2021

Thank you @German5FFC for the help. Could you suggest me some site where I can keep my pdf and use the link. I was thinking of using Mega where I can upload all my files and use the link as pdf source. Could you also confirm if the steps I'm following are they correct? 

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
Community Beginner ,
Apr 11, 2021 Apr 11, 2021

Dropbox, Google Drive are good options too. Keep in mind that there are limits on how many people can access that file. And do not forget the difference between a direct link and a link to a file. For example

link to a file: https://www.dropbox.com/s/3epmnxwhrnk7lgd/Bodea%20Brochure.pdf?dl=0

direct link: https://dl.dropboxusercontent.com/s/3epmnxwhrnk7lgd/Bodea%20Brochure.pdf

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
Community Beginner ,
Apr 11, 2021 Apr 11, 2021

Google drive is a better option which link should I be using as source link (Link to file / direct link). Is this code correct ?

<div id="adobe-dc-view"></div>
<script src="https://documentcloud.adobe.com/view-sdk/main.js"></script>
<script type="text/javascript">
document.addEventListener("adobe_dc_view_sdk.ready", function(){
var adobeDCView = new AdobeDC.View({clientId: "9f1b28edec7b42fcb3581a1a501373d9", divId: "adobe-dc-view"});
adobeDCView.previewFile({
content:{promise: "<FILE_BLOB_PROMISE>"},
metaData:{fileName: "<FILE_NAME>"}
}, {});
});
</script>

 

Do different webpages require differnt clinet id

e.g. if I have Client Id a3463456 for a domain name ww.roundstudy.com can i use the same client ID for 

 www.roundstudy.com/faq ?

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
Community Beginner ,
Apr 11, 2021 Apr 11, 2021

The code is ok.
And no, the client id is the same for every page of your 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
Community Beginner ,
Apr 11, 2021 Apr 11, 2021

Thank you very much @German5FFC . I'll try this and see if it 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
Community Beginner ,
Apr 25, 2021 Apr 25, 2021

Hi @German5FFC 

 

I'm still facing the same issue. When i load the code in my iframe this error appears

vipul0D4D_0-1619334213143.png

The code I use is

 

<div id="adobe-dc-view"></div>
<script src="https://documentcloud.adobe.com/view-sdk/main.js"></script>
<script type="text/javascript">
	document.addEventListener("adobe_dc_view_sdk.ready", function(){ 
		var adobeDCView = new AdobeDC.View({clientId: "9f1b28edec7b42fcb3581a1a501373d9", divId: "adobe-dc-view"});
		adobeDCView.previewFile({
			content:{location: {url: "https://dl.dropboxusercontent.com/s/u9dmuz8dx5jtddr/Visning%20af%20PDF%20i%20MB%2001.pdf"}},
			metaData:{fileName: "Visning af PDF i MB 01.pdf"}
		}, {});
	});
</script>

I'm using dropbox for my pdf location and the direct link is "https://dl.dropboxusercontent.com/s/u9dmuz8dx5jtddr/Visning%20af%20PDF%20i%20MB%2001.pdf"

My domain name is "www.roundstudy.com".

 

Please help

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
Community Beginner ,
Apr 25, 2021 Apr 25, 2021

Try to register the domain that the error is showing

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
Community Beginner ,
Apr 25, 2021 Apr 25, 2021

I tried it and it's working now thank you very much ☺️☺️☺️ @German5FFC 

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
Community Beginner ,
Apr 25, 2021 Apr 25, 2021

😄

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
Community Beginner ,
May 03, 2021 May 03, 2021

@German5FFC 

 

How can we disable commenting in the annotation feature

vipul0D4D_0-1620051897776.png

 

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
Community Beginner ,
May 03, 2021 May 03, 2021

You should set showAnnotationTools on false.

For example:

var adobeDCView = new AdobeDC.View({clientId: "blablabla1", divId: adobe-dc-view});
adobeDCView.previewFile({
content:{location: {url: url}},
metaData:{fileName: name}
}, {embedMode: "FULL_WINDOW", showAnnotationTools: false});

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
Community Beginner ,
May 03, 2021 May 03, 2021

@German5FFC  But I want require the highlight pen option but not the commnet feature

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
LEGEND ,
May 03, 2021 May 03, 2021

Highlights are comments. They are one of the many comment types available in PDF.

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
Community Beginner ,
May 03, 2021 May 03, 2021

Im not really sure if you can, I strongly advise you to check the documentation. If you are desperate, you can hide them with css. Every button you see has an id (stickyNote, highlight, freehandTool, etc). 

 

German5FFC_0-1620101520226.png

 

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