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