Skip to main content
Participant
January 21, 2025
Question

Error: Cannot get DCAPI rendition if DCAPI is disabled

  • January 21, 2025
  • 3 replies
  • 423 views

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

 

    3 replies

    Participant
    June 23, 2025

    I am getting this same error, my config is pretty large but this has worked with the same code for a couple years

    Participant
    February 5, 2025

    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.

    Joel Geraci
    Community Expert
    Community Expert
    February 5, 2025

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

    Joel Geraci
    Community Expert
    Community Expert
    January 22, 2025

    Do you have a client ID for "localhost"?