Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我基于一些带有 ruby pdf libary - prawn 的模板生成 PDF。我的脚本只是在第一个模板页面的顶部添加了一个签名。
我注意到,当我打开模板并执行 stroke_bounds 时,有时它们不会粘在页面的边缘 - 所以签名的位置错误(因为它取决于边界)。
有没有办法让它正常化?感谢您的任何回答。
如果我没记错的话,有一个默认边距(0.5 英寸)。但是您可以使用:margin选项更改它。( :left_margin, :right_margin, :top_margin, :bottom_margin)。希望这很有用。
:margin
:left_margin, :right_margin, :top_margin, :bottom_margin