简体   繁体   English

如何使用nodeJS将PNG图像转换为pdf

[英]How to convert PNG images to pdf using nodeJS

I was searching for NPM package which could help me to combine and convert multiple PNG images into pdf format. 我正在寻找NPM软件包,该软件包可以帮助我将多个PNG图像合并并转换为pdf格式。 However I could only find pdf to png conversion packages not the other way around. 但是我只能找到pdf到png转换包,反之则不行。

https://www.npmjs.com/search?q=png%20to%20pdf&page=1&ranking=optimal https://www.npmjs.com/search?q=png%20to%20pdf&page=1&ranking=optimal

PDF is just a document format. PDF只是一种文档格式。 You can eventually add new image. 您最终可以添加新图像。 Look, here is a simillar question. 看,这是一个类似的问题。 Is there an npm module to modify a pdf file in node.js? 是否有一个npm模块来修改node.js中的pdf文件?

And the first link from this topic https://github.com/bpampuch/pdfmake#images 以及该主题的第一个链接https://github.com/bpampuch/pdfmake#images

Lately I've started using imagemagic, it's pretty fast. 最近,我开始使用imagemagic,它的速度非常快。 There's a node package for imagemagic available out there although I haven't tried it yet. 尽管我还没有尝试过,但是有一个可用的imagemagic节点包。

Imagemagic official website link Imagemagic官方网站链接

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM