fix(pdf): respect PREVIEW.image_quality

See also: https://man.archlinux.org/man/pdftoppm.1#quality
This commit is contained in:
gaesa 2024-12-06 12:28:47 +00:00
parent 3bd625a8af
commit 78cfb1751d
No known key found for this signature in database

View file

@ -26,7 +26,15 @@ function M:preload(job)
end
local output = Command("pdftoppm")
:args({ "-singlefile", "-jpeg", "-jpegopt", "quality=75", "-f", tostring(job.skip + 1), tostring(job.file.url) })
:args({
"-singlefile",
"-jpeg",
"-jpegopt",
"quality=" .. tostring(PREVIEW.image_quality),
"-f",
tostring(job.skip + 1),
tostring(job.file.url),
})
:stdout(Command.PIPED)
:stderr(Command.PIPED)
:output()