How to preload PDF to avoid layered rendering using the DCSDK?
The documentation for the DCSDK shows that you can specify a url to load a PDF, but the rendering is very slow and causes 1 layer at a time to be rendered. We are displaying watermarked documents, so we don't want to have a half second where the watermark is not visible during rendering process. Is there a way to pre-render before showing the document or potentially load from memory instead of from a url?
The documentation say you can use a File blob by specifying a promise, but I see no code examples. I was hoping I could retrieve the PDF bytes from a server and then pass it to the PDF library to render and perhaps speed up the render process.
let adobeDCView = new AdobeDC.View({ clientId: clientId, divId: "adobe-dc-view" });
adobeDCView.previewFile({
// content: { location: { url: "server.com/my_file.pdf" } }, // works but slow render
content: { promise: promise }, // does not work when resolving this promise with a Blob of type 'application/pdf'
metaData: { fileName: "my_file.pdf" }
}, { showAnnotationTools: false, showDownloadPDF: false, showPrintPDF: false });