How can I convert image in base64 format to pdf?

const imagesToPdf = require(“images-to-pdf”)
const images1= async () =>{
const response = await imagesToPdf([“C:/Users/DJ/Desktop/image1.jpg”, “C:/Users/DJ/Desktop/image2.jpg”], “imagepd.pdf”)
if (response.error) { console.log(‘error’);}
console.log(‘fetched response’)


Above code is producing a pdf with the images, but now the challenge is that the images are in base64 string, how can I modify above to take input in base64 format and generate pdf?

(You might get an answer here, but because this forum is focused on npm, you might want to ask your question somewhere that targets experts with your package. I have moved your topic to #community:javascript)

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.