Skip to main content
Participant
Jan 21, 2025 7:28 AM UTC
Question

Error: Cannot get DCAPI rendition if DCAPI is disabled

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

 

    4 replies

    Participant
    Jun 23, 2025 2:04 PM UTC

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

    Translate
    Participant
    Feb 5, 2025 8:58 PM UTC

    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.

    Translate
    Joel Geraci
    Community Expert
    Community Expert
    Feb 5, 2025 9:47 PM UTC

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

    Translate
    Joel Geraci
    Community Expert
    Community Expert
    Jan 22, 2025 4:51 PM UTC

    Do you have a client ID for "localhost"?

    Translate