Belval / pdf2image

A python module that wraps the pdftoppm utility to convert PDF to PIL Image object
MIT License
1.6k stars 194 forks source link

Render page result is more drak then origin pdf? #218

Closed frideal closed 2 years ago

frideal commented 3 years ago
convert_from_path(inputfilepath, 150, outputfolderpath ,fmt="PNG",output_file=outputfilename,size=(None,1080),thread_count=10)

i use convert_from_path to render each page to png files.but i find render result is more drak then origin pdf look at the camel and bull

render result: image

origin pdf look in Adobe Acrobat Reader DC(32bit) image

origin: image

pdf2image render result: image

mara004 commented 2 years ago

Maybe these images have a colour profile embedded into the PDF that pdftoppm does not preserve?

Belval commented 2 years ago

@mara004 response might be one thing, but you can also clearly see that pdftoppm is smoothing the output whereas Adobe is not.

Unfortunately pdf2image is just a wrapper around pdftoppm so I don't think anything can be done on my side :(