Copy link to clipboard
Copied
I am unable to preload data on AdobeDCView
document.addEventListener("adobe_dc_view_sdk.ready", function () {
var adobeDCView = new AdobeDC.View({clientId: "XXXXXXXXXXXXXX", divId: "adobe-dc-view"});
adobeDCView.previewFile({
content: {location: {url: "http://localhost/test.pdf"}},
metaData: {fileName: "test.pdf"}
}, {});
// Data you want to pre-fill
adobeDCView.registerCallback(
AdobeDC.View.Enum.CallbackType.PAGE_VIEW,
function () {
// Data you want to pre-fill
var prefilledData = {
"emp_fn": {value: "John"},
"emp_ln": {value: "Doe"}
// ... any other field names and their values
};
// Set the form fields with the prefilled data
adobeDCView.setFormFields(prefilledData);
},
true
);
});//event listener
Have something to add?