Skip to main content

PDF file

If you got a PDF file in hand, you can use getImagesFromPDF to extract pages in base64 format and pass them to <AnnotationViewer> using a proper state.

getImagesFromPDF(pdfFile).then((images: string[]) => {  console.log(images); // ===> [base64_1, base64_2, ...]});

Full example#