创建 PDF,将其插入另一个并合并页面 - ruby​​ PDF 工具?

发布于 2024-10-06 04:30:31 字数 491 浏览 0 评论 0原文

我正在寻找一个 ruby​​ 工具,它允许我:

  1. 使用图像、文本和条形码创建 pdf(我使用 barby< /a>)。该文档有非常精确的规范——所有元素都必须正确放置。
  2. 获取该 pdf 文件,旋转、缩放并将其放入另一个 pdf 页面中。
  3. 合并多个 pdf 页面。

PDFlib 非常适合此操作,并且允许执行所有三个步骤,但它太昂贵了......同样的原因使我远离检查王子。经过调查,我得出了以下可能的解决方案:

1 .
- 虾?
- 邪恶的PDF?
- PDFkit?

2. ???

3.
- pdf合并?
- pdf 工具包?

还有什么我错过的吗?哪个选项可能是最好的?哪个库可以支持步骤2?

感谢您的帮助!

I am searching for a tool for ruby, that allows me to:

  1. Create pdf with images, texts and barcodes (I use barby). This document has a very precise specification – all elements have to be placed correctly.
  2. Take that pdf, rotate, scale and place it in another pdf page.
  3. 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

盛装女皇 2024-10-13 04:30:31

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.

比忠 2024-10-13 04:30:31

我会使用 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)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文