CSS and PDF VS CSS and HTML :: PDF should use same style as HTML #113

Open
robotarmy opened this Issue Aug 16, 2011 · 2 comments

Projects

None yet

1 participant

@robotarmy

The HTML generated for the PDF is correct - however the PDF rendering is not the same.

HTML
PDF

  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

thank you

@robotarmy

the PDF Print function in WebKit is ignoring the font/size of the html document that it is printing

@robotarmy robotarmy closed this Aug 16, 2011
@robotarmy robotarmy reopened this Aug 16, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment