Permalink
Browse files

Fix reading generated pdf file on windows machines by forcing binary …

…mode
  • Loading branch information...
1 parent 35e1a99 commit 92884942b3c4783ec16aa2888da0cfc6912726ec Matt committed Nov 6, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/wicked_pdf.rb
View
@@ -40,6 +40,7 @@ def pdf_from_string(string, options={})
stderr.read
end
generated_pdf_file.rewind
+ generated_pdf_file.binmode
pdf = generated_pdf_file.read
raise "PDF could not be generated!" if pdf and pdf.rstrip.length == 0
pdf

0 comments on commit 9288494

Please sign in to comment.