yakovmeister / pdf2image

A utility for converting pdf to image and base64 format.
MIT License
435 stars 141 forks source link

.setGMClass(true).bulk(-1, false) #155

Closed dev-fredericfox closed 1 year ago

dev-fredericfox commented 2 years ago

I am using following: await fromPath( pathForThePDFThatWeWantToTest, options ).setGMClass(true).bulk(-1, false) but I am getting this error TypeError: Cannot read properties of undefined (reading 'bulk'). It works fine when I omit .setGMClass(true). Anyone knows why?

hongphuc5497 commented 1 year ago

You should define setGMK before calling bulk, for example

const storeAsImage = fromPath( pathForThePDFThatWeWantToTest, options ).setGMClass(true)
const images = await storeAsImage.bulk(-1, false);