In case this helps, I use PDFKit and can render the PDF to the landscape using:
respond_to do |format| format.html format.pdf { html = render_to_string(:layout => false , :action => "my_page.html.haml") kit = PDFKit.new(html, :orientation => 'Landscape') kit.stylesheets << "#{Rails.root}/public/stylesheets/views/pdf.css" send_data(kit.to_pdf, :filename => "some_name.pdf", :type => 'application/pdf') return
I got the orientation part from here: https://github.com/pdfkit/pdfkit/issues/12
source share