From 82aae41a8d9211dd21b5bf01a4e5dde390dbffef Mon Sep 17 00:00:00 2001 From: Markus Kahl Date: Fri, 6 May 2016 08:35:57 +0100 Subject: [PATCH] updated prawn --- .../pdf_export/export_card/document_generator.rb | 6 +++--- openproject-pdf_export.gemspec | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/open_project/pdf_export/export_card/document_generator.rb b/lib/open_project/pdf_export/export_card/document_generator.rb index d9b65883f2..7b99e420df 100644 --- a/lib/open_project/pdf_export/export_card/document_generator.rb +++ b/lib/open_project/pdf_export/export_card/document_generator.rb @@ -46,9 +46,6 @@ module OpenProject::PdfExport::ExportCard page_layout = :landscape if config.landscape? else :portrait page_size = config.page_size or defaults[:page_size] - geom = Prawn::Document::PageGeometry::SIZES[page_size] - @paper_width = geom[0] - @paper_height = geom[1] @pdf = Prawn::Document.new( :page_layout => page_layout, @@ -57,6 +54,9 @@ module OpenProject::PdfExport::ExportCard :top_margin => 0, :bottom_margin => 0, :page_size => page_size) + + @paper_width = @pdf.bounds.width + @paper_height = @pdf.bounds.height end def render diff --git a/openproject-pdf_export.gemspec b/openproject-pdf_export.gemspec index f98826b257..8b630d7ff5 100644 --- a/openproject-pdf_export.gemspec +++ b/openproject-pdf_export.gemspec @@ -16,8 +16,8 @@ Gem::Specification.new do |s| s.files = Dir["{app,config,db,lib,doc}/**/*", "README.md"] s.add_dependency 'rails', '~> 4.2.4' - - s.add_dependency "prawn", "~> 0.14.0" + + s.add_dependency "prawn", "~> 2.1.0" s.add_development_dependency "pdf-inspector", "~>1.0.0" end