ruby-on-rails – 使用ruby将文本添加到现有pdf

我有一个rails应用程序加入任何计数的pdf文件.现在我需要使用
ruby为加入的pdf添加编号.

是否有使用ruby将文本或其他内容添加到现有pdf文件的最新方法?

最佳答案 这个解决方案对我很有用……

Prawn::Document.generate("output.pdf", :template => "/path/to/template.pdf") do
  text "This is a text in a copied pdf.", :align => :center
end
点赞