Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Open
robotarmy opened this Issue · 2 comments

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
@robotarmy robotarmy reopened this
@wildjcrt wildjcrt referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.