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

Error: Cannot get DCAPI rendition if DCAPI is disabled

New Here ,
Jan 20, 2025 Jan 20, 2025

Copy link to clipboard

Copied

Hi,

 

I am trying to use PDF Embed viewer in my .NET web application and running in my local machine. Its giving some error while giving the pdf url to the viewer.

 

Error : Error: Cannot get DCAPI rendition if DCAPI is disabled

 

Code Sample

URL : https://localhost:7088/

JS Method 

document.addEventListener("adobe_dc_view_sdk.ready", function () {
var adobeDCView = new AdobeDC.View({
clientId: "APIKey" // Replace with your actual Client ID
});

var pdfUrl = document.getElementById("pdfUrl").value;
if (pdfUrl) {
adobeDCView.previewFile({
content: { location: { url: pdfUrl } },
metaData: { fileName: pdfUrl.split("/").pop() }
}, { embedMode: "IN_LINE" });
}
});

function previewFile(url, fileName) {
var adobeDCView = new AdobeDC.View({ clientId: "APIKey" });
adobeDCView.previewFile({
content: { location: { url: url } },
metaData: { fileName: fileName }
}, { embedMode: "IN_LINE" });
}

 

Error Screen

marvel_brain4766_0-1737444445918.png

 

Views

47

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 Expert ,
Jan 22, 2025 Jan 22, 2025

Copy link to clipboard

Copied

Do you have a client ID for "localhost"?

Votes

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 05, 2025 Feb 05, 2025

Copy link to clipboard

Copied

I'm having the same issue. I'm just trying to get the demo to work in my Blazor app .NET 8, but I keep getting the DCAPI error/promise rejection and after checking I do have a client ID for localhost still the same issue.

Votes

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 Expert ,
Feb 05, 2025 Feb 05, 2025

Copy link to clipboard

Copied

LATEST

You won't be able to run Embed API on client-side Blazor apps. It only works in browsers.  

Votes

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