Skip to content

showing blank jpeg image. #4

@raginisahu

Description

@raginisahu

const pdf = require('pdf-thumbnail');
const pdfBuffer = require('fs').readFileSync('/home/ragini/Desktop/front page.pdf');

pdf(
pdfBuffer, /Buffer or stream of the pdf/
{
crop: {
width: 200,
height: 400,
x: 0,
y: 0
}
})
.then(data /Stream of the image/ => data.pipe(fs.createWriteStream(join('/home/ragini/Desktop', "preview", "previewBuffer.jpg"))))
// ...

please give me solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions