node-pdf2img
node-pdf2img copied to clipboard
Output to base64?
Thanks for this, it works just fine if you follow the instructions for install! Also note that ImageMagick does NOT work on other platforms than Linux (it works fine in Ubuntu subsystem on Windows 10 though).
I'd like to request a feature to return the created image as base64 instead of saving it to file on disk. E.g.:
{ result: 'success',
message:
[ { page: 1,
name: 'test_1',
size: 17.275,
content: '/9j/7QBEUGhvdG9zaG9...base64-encoded-image-content...fXNWzvDEeYxxxzj/Coa6Bax//Z'
},
{ page: 2,
name: 'test_2',
size: 24.518,
content: '/9j/7QBEUGhvdG9zaG9...base64-encoded-image-content...fXNWzvDEeYxxxzj/Coa6Bax//Z'
}
]
}
It already exists support in https://github.com/didikeke/gm-base64/. Maybe something to work from?
It's a good idea. It will be included in the next release.
Hi, I made pdf to image converter that supports this feature you can go check it out at: https://github.com/yakovmeister/pdf2image