· 1 min read

Screencast: PDF Dokumente mit PDFKit generieren

Download:

Download(18.5 MB, 8:14) Alternativer Download für iPod & Apple TV(16.8 MB, 8:14)

Resourcen:

Quellcode:

[bash] bundle install rake middleware [/bash]

[ruby] # config/application.rb config.middleware.use “PDFKit::Middleware”, :print_media_type => true [/ruby]

[html] <%= stylesheet_link_tag ‘application’, :media => “all” %>

\[/html\]

[css] /* application.css */ @media print { body { background-color: #FFF; }

#container { width: auto; margin: 0; padding: 0; border: none; } #line_items { page-break-before: always; } #pdf_link { display: none; } } [/css]

Back to Blog