vinayak-mehta / pdftopng

A PDF to PNG conversion library (based on pdftoppm from poppler)
GNU General Public License v2.0
40 stars 19 forks source link

Make png path optional. If no png path given, use pdf path and replace extension. #16

Open dkrako opened 2 years ago

dkrako commented 2 years ago

Usually I always want to have the same filename for the pngs as for the pdfs, except for the file extension. When I'm using this via CLI, I always have to pass the pdf paths, which is cumbersome in my use case.

This PR makes the png path optional to increase usability. If there's no png path given, use pdf path and replace extension.

example:

pdftopng example.pdf

will create the file example.png