Combining multiple pngs in a single pdf in python

后端 未结 4 2028
梦谈多话
梦谈多话 2021-01-07 12:50

I am wondering if there is an easy way to combine multiple png images into a single pdf in python. I want each image to be a single page in the pdf. Is pypdf the best librar

4条回答
  •  无人及你
    2021-01-07 13:36

    I've recently found img2pdf, very useful and easy to use... the code is so simply as following (and you can complicate it with some others additional parameters):

    img2pdf *png -o output_all_pngs.pdf
    

    I hope it helps you!

提交回复
热议问题