Skip to content

Commit

Permalink
Fix an issue that caused an IllegalArgumentException.
Browse files Browse the repository at this point in the history
Rails.root.join, if used, will pass a Pathname class to FillablePDF instead of a string. This change ensures that Java is always given a file path that is represented by a string.
  • Loading branch information
vkononov committed Nov 16, 2021
1 parent d7a3b8c commit 24d85ea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/fillable-pdf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def initialize(file_path)
@file_path = file_path
begin
@byte_stream = BYTE_STREAM.new
@pdf_reader = PDF_READER.new @file_path
@pdf_reader = PDF_READER.new @file_path.to_s
@pdf_writer = PDF_WRITER.new @byte_stream
@pdf_doc = PDF_DOCUMENT.new @pdf_reader, @pdf_writer
@pdf_form = PDF_ACRO_FORM.getAcroForm(@pdf_doc, true)
Expand Down
2 changes: 1 addition & 1 deletion lib/fillable-pdf/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
class FillablePDF
VERSION = '0.9.0'
VERSION = '0.9.2'
end

0 comments on commit 24d85ea

Please sign in to comment.