Skip to content

Commit

Permalink
Revert "Remove pdfkit and wkhtmltopdf-binary gems."
Browse files Browse the repository at this point in the history
This reverts commit 241d65b.

Conflicts:
	Gemfile
	Gemfile.lock
  • Loading branch information
huerlisi committed May 8, 2015
1 parent d296a5d commit 9ef5c55
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Gemfile
Expand Up @@ -126,6 +126,9 @@ gem 'carrierwave'
gem 'best_in_place'

# PDF generation
gem 'pdfkit', :git => 'http://github.com/huerlisi/PDFKit.git'
gem 'wkhtmltopdf-binary'

gem 'prawn', '~> 0.12' # API incompatible
gem 'prawn_rails'

Expand Down
9 changes: 9 additions & 0 deletions Gemfile.lock
Expand Up @@ -4,6 +4,12 @@ GIT
specs:
mt940_parser (1.1.0)

GIT
remote: http://github.com/huerlisi/PDFKit.git
revision: e4a8a67a69394be211358b04235bb3ce28a33d52
specs:
pdfkit (0.5.2)

GEM
remote: http://rubygems.org/
specs:
Expand Down Expand Up @@ -392,6 +398,7 @@ GEM
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.2)
will_paginate (3.0.7)
wkhtmltopdf-binary (0.9.9.3)
xpath (2.0.0)
nokogiri (~> 1.3)
yaml_db (0.3.0)
Expand Down Expand Up @@ -441,6 +448,7 @@ DEPENDENCIES
lyb_sidebar
mt940_parser!
omniauth-google-oauth2
pdfkit!
pg
pg_search
poltergeist
Expand Down Expand Up @@ -472,4 +480,5 @@ DEPENDENCIES
versionist
vesr
will_paginate
wkhtmltopdf-binary
yaml_db
2 changes: 2 additions & 0 deletions config/application.rb
Expand Up @@ -67,6 +67,8 @@ class Application < Rails::Application
# List of assets to precompile
config.assets.precompile += %w( ie.css ie6.css print.css screen.css bookyt_stock.css bookyt_salary.css bookyt_projects.css)

config.middleware.use PDFKit::Middleware, {}, :except => %r[(letter|payslip)]

# Engines
config.bookyt = ActiveSupport::OrderedOptions.new
config.bookyt.engines = []
Expand Down
7 changes: 7 additions & 0 deletions config/initializers/pdfkit.rb
@@ -0,0 +1,7 @@
PDFKit.configure do |config|
# config.wkhtmltopdf = '/usr/bin/wkhtmltopdf'
config.default_options = {
:page_size => 'A4',
:print_media_type => true
}
end

0 comments on commit 9ef5c55

Please sign in to comment.