Closed IgorRomanvsky closed 3 years ago
I'm trying to convert pdf into image and i just can't understand how should i adjust the output resolution. If i'm doing like this:
gm(`${sourcePath}[0]`) .setFormat('jpg') .stream() .pipe(writeStream);
The output quality here is very low, so i'm trying to use density(594, 842) like that:
density(594, 842)
gm(`${sourcePath}[0]`) .setFormat('jpg') .quality(100) .density(595, 842) .stream() .pipe(writeStream);
but doing this the image looks very starchy.
Can anyone please point me what should i do in order to receive the output image close as possible to the pdf source?
Thanks!
I'm trying to convert pdf into image and i just can't understand how should i adjust the output resolution. If i'm doing like this:
The output quality here is very low, so i'm trying to use
density(594, 842)
like that:but doing this the image looks very starchy.
Can anyone please point me what should i do in order to receive the output image close as possible to the pdf source?
Thanks!