创建 PDF,将其插入另一个并合并页面 - ruby PDF 工具?
我正在寻找一个 ruby 工具,它允许我:
- 使用图像、文本和条形码创建 pdf(我使用 barby< /a>)。该文档有非常精确的规范——所有元素都必须正确放置。
- 获取该 pdf 文件,旋转、缩放并将其放入另一个 pdf 页面中。
- 合并多个 pdf 页面。
PDFlib 非常适合此操作,并且允许执行所有三个步骤,但它太昂贵了......同样的原因使我远离检查王子。经过调查,我得出了以下可能的解决方案:
1 .
- 虾?
- 邪恶的PDF?
- PDFkit?
2. ???
3.
- pdf合并?
- pdf 工具包?
还有什么我错过的吗?哪个选项可能是最好的?哪个库可以支持步骤2?
感谢您的帮助!
I am searching for a tool for ruby, that allows me to:
- Create pdf with images, texts and barcodes (I use barby). This document has a very precise specification – all elements have to be placed correctly.
- Take that pdf, rotate, scale and place it in another pdf page.
- Merge several pdf pages.
PDFlib was perfect for this and allowed to do all the three steps, but it's too expensive... The same reason keeps me away form checking princely. My invesitigation led me to the following possible solutions:
1 .
- prawn?
- wicked PDF?
- PDFkit?
2 . ???
3 .
- pdf-merger?
- pdf toolkit?
Is there something else that I missed? Which option could be the best? Which lib can support step 2?
Thanks for any help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
pdfkit 应该能够处理您提到的所有项目。我对此非常幸运。如果你能用 html/css 布局它,你就可以把它做成 pdf。您可以通过将参数传递给 pdfkit 中间件来处理environment.rb 中的缩放和旋转。
pdfkit should be able to handle all the items you mention. I've had great luck with it. If you can lay it out with html/css, you can make it a pdf. You can handle scaling and rotation in your environment.rb by passing params to the pdfkit middleware.
我会使用 Prawn 创建带有图像的 PDF 和 组合 PDF 进行旋转、缩放并将其放置在不同的 PDF 中。
(作为CombinePDF的作者,我有偏见)
I would use Prawn to create the PDF with the images and CombinePDF to Rotateit, scale it and place it within a different PDF.
(I'm biased, being CombinePDF's author)