thanks in advance.
Can you elaborate on your question?
Hi thanks for your reply.
basically i used the previewPDF function in window.AdobeDC.View class to render a pdf from a URL.
and after it loads the PDF automatically, i want to get a raw arrayBuffer content of the loaded PDF so that i could do some processing on it.
So i wonder if there is an API for requesting the raw pdf buffer.
I know that annotationManager.removeAnnotationsFromPDF returns the PDF buffer, but to use this function, i have to set the "IncludePDFAnnotations" to true, which I don't want, cos the additional save button will appear...
sorry, the API call should be previewFile()
At this time, you can't just get the PDF arrayBuffer whenever you want it. As you noticed, only a few API calls will give that to you and there currently isn't any way to write the modified buffer back without reloading the PDF. My suggestion would be to get the PDF via fetch and then pass the content to AdobeDC.View as a Promise after you've done whatever processing you need to do on the PDF.
I'm curious to hear what preprocessing you are doing. Is it something that makes sense to add to Embed API?
Ah - Ok - That's easy. Look at the getPDFMetadata call to get the title, number of pages etc.
I think I understand but let me check. The title in the metadata isn't the text that would be recognized by a human as the title of the document if they were reading it on screen. If that's the case, take a look at our PDF Tools / Extract API.
You can read about it here https://medium.com/adobetech/extract-content-structure-from-pdfs-using-ai-powered-adobe-pdf-extract-...