英文:
How can I convert images to a pdf document go lang?
问题
我正在尝试制作一个小工具,用于从网站下载图片并自动转换为PDF。我已经尝试查找Go语言库来将图片转换为PDF,但大多数库都与将PDF转换为图片相关,即使在像Maroto和GofPdf这样的库中,也没有详细说明如何将一个目录中的图片转换为PDF文件。我已经用Python做过这个,但对于我的用例来说速度太慢了。
英文:
I am trying to make a small tool to download images from websites and automatically convert them to PDF. I have tried looking for go lang libraries to convert images to pdf however most of them are related to converting to pdf to images and even in the libraries such as Maroto and GofPdf they don't go into details on how to convert a directory full of images into a pdf file. I have done this in python but it's super slow for my use case.
答案1
得分: 1
PdfCpu工作得很好:
pdfcpu import out.pdf a.jpg b.jpg
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论