我可以很好地将 HTML 页面转换为 PDF 文档。问题是,我不知道如何将 HTML 文件转换为横向 PDF。有没有办法在控制器中设置它?
从控制器...
def pdf_customer_shipments
@customer = Customer.find(params[:id])
@shipments = Shipment.where("customer_id = ? AND status = 'Open'", @customer.id)
render :layout => 'pdf'
end