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.
612px 792px に設定された html レイアウトがあり、8.5 x 11 文字サイズのページとしてレンダリングされます。
ただし、レンダリングすると、文字サイズよりも小さいものが出てきます。
何か案は?
Wkhtmltopdf のデフォルトのページ サイズは、デフォルトで A4 です。
これを render 呼び出しに追加します。
render :pdf => 'my_file.pdf', :page_size => 'Letter'
または、次のように config/initializers/wicked_pdf.rb に追加します。
WickedPdf.config = { :page_size => 'Letter' }
アプリケーション全体の変更。