I am using Adobe PDF Embedded API to view, edit & save the PDF and it is working fine.
The problem is when I tried to get the add or get the annotation list there is a File ID inside a metaData object which has to pass to it mandatory.
Using the below code to access the annotations from the PDF:
document.addEventListener("adobe_dc_view_sdk.ready", function()
{
var adobeDCView = new AdobeDC.View({clientId: "<YOUR_CLIENT_ID>", divId: "adobe-dc-view"});
var previewFilePromise = adobeDCView.previewFile({
content: {location: {url: "https://documentcloud.adobe.com/view-sdk-demo/PDFs/Bodea Brochure.pdf"}},
//id is
metaData: {
fileName: "Bodea Brochure.pdf",
/* file ID */
id: "77c6fa5d-6d74-4104-8349-657c8411a834"}
},
{
enableAnnotationAPIs: true,
});
previewFilePromise.then(adobeViewer => {
adobeViewer.getAnnotationManager().then(annotationManager => {
// All annotation APIs can be invoked here
});
});
});
Can anyone tell me how to get the File ID to add inside a metaData Object.