Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

…mode
  • Loading branch information...
commit 92884942b3c4783ec16aa2888da0cfc6912726ec 1 parent 35e1a99
@mkelly12 mkelly12 authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  lib/wicked_pdf.rb
View
1  lib/wicked_pdf.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.