Closed sladg closed 1 year ago
Considering this library is not maintained anymore (last commit 3 years ago, no response from author), here is a solution using ghostscript-node.
ghostscript-node
import { readFileSync } from 'fs' import gs from 'ghostscript-node' export const convertPdfToPng = async (filePath: string) => { const pdfBuffer = readFileSync(filePath) const firstPage = 1 const lastPage = 22 const dpi = 600 return await gs.renderPDFPagesToPNG(pdfBuffer, firstPage, lastPage, dpi) }
Hi @sladg
We will try to keep it maintained. Please feel free to submit an issue if you have some bug to report.
Considering this library is not maintained anymore (last commit 3 years ago, no response from author), here is a solution using
ghostscript-node
.