Not able to extract the images from the PDF file. #1688
Unanswered
AnkitAgarwal547
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to extract the images from the pdf, but it's throw error.
Error extracting images: TypeError: page.node.Resources(...).XObject is not a function
Please help me or suggest better way to extract the image.
` const pdfDoc = await PDFDocument.load(pdfBuffer);
// Get the number of pages
const pages = pdfDoc.getPages();
for (let i = 0; i < pages.length; i++) {
const page = pages[i];
}
`
Beta Was this translation helpful? Give feedback.
All reactions