CSS and PDF VS CSS and HTML :: PDF should use same style as HTML
Opened this issue · 2 comments
robotarmy commented
The HTML generated for the PDF is correct - however the PDF rendering is not the same.
def pdf(static=true)
@slides = get_slides_html(static)
@no_js = false
html = erb :onepage
File.open("/tmp/presto.html",File::CREAT|File::TRUNC|File::RDWR) {|f|
f << html
}
# TODO make a random filename
# PDFKit.new takes the HTML and any options for wkhtmltopdf
# run `wkhtmltopdf --extended-help` for a full list of options
kit = PDFKit.new(html, :page_size => 'Letter', :orientation => 'Landscape')
# Save the PDF to a file
file = kit.to_file('/tmp/preso.pdf')
end
robotarmy commented
thank you
robotarmy commented
the PDF Print function in WebKit is ignoring the font/size of the html document that it is printing