Skip to content

Commit

Permalink
Update rjb dependency and iText binaries to v7.2.3.
Browse files Browse the repository at this point in the history
  • Loading branch information
vkononov committed Jul 14, 2022
1 parent 6cb1e2b commit 0b13942
Show file tree
Hide file tree
Showing 18 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ FillablePDF is an extremely simple and lightweight utility that bridges iText an

**Prerequisites:** Java SE Development Kit v8, v11

- Ensure that your `JAVA_HOME` variable is set before installing this gem (see examples below).**
- Ensure that your `JAVA_HOME` variable is set before installing this gem (see examples below).

* OSX: `/Library/Java/JavaVirtualMachines/jdk-11.0.2.jdk/Contents/Home`
* Ubuntu/CentOS: `/usr/lib/jvm/java-1.8.0-openjdk`
Expand Down
Binary file modified example/output.flat.pdf
Binary file not shown.
Binary file modified example/output.pdf
Binary file not shown.
Binary file added ext/commons-7.2.3.jar
Binary file not shown.
Binary file not shown.
Binary file removed ext/forms-7.1.17.jar
Binary file not shown.
Binary file added ext/forms-7.2.3.jar
Binary file not shown.
Binary file removed ext/io-7.1.17.jar
Binary file not shown.
Binary file added ext/io-7.2.3.jar
Binary file not shown.
Binary file removed ext/kernel-7.1.17.jar
Binary file not shown.
Binary file added ext/kernel-7.2.3.jar
Binary file not shown.
Binary file removed ext/layout-7.1.17.jar
Binary file not shown.
Binary file added ext/layout-7.2.3.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion fillable-pdf.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'rubocop-performance'
spec.add_development_dependency 'rubocop-rake'

spec.add_runtime_dependency 'rjb', '1.6.2'
spec.add_runtime_dependency 'rjb', '~> 1.6'
spec.requirements << 'JDK 8.x - 11.x'

spec.metadata = {
'rubygems_mfa_required' => 'true'
Expand Down
2 changes: 1 addition & 1 deletion lib/fillable-pdf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def set_image(key, file_path) # rubocop:disable Metrics/AbcSize, Metrics/MethodL
#
def set_image_base64(key, base64_image_data)
tmp_file = SecureRandom.uuid
File.open(tmp_file, 'wb') { |f| f.write(Base64.decode64(base64_image_data)) }
File.binwrite(tmp_file, Base64.decode64(base64_image_data))
set_image(key, tmp_file)
ensure
FileUtils.rm tmp_file
Expand Down
4 changes: 2 additions & 2 deletions lib/fillable-pdf/itext.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module ITEXT
ByteArrayOutputStream = Rjb.import 'com.itextpdf.io.source.ByteArrayOutputStream'
Canvas = Rjb.import 'com.itextpdf.layout.Canvas'
Div = Rjb.import 'com.itextpdf.layout.element.Div'
HorizontalAlignment = Rjb.import 'com.itextpdf.layout.property.HorizontalAlignment'
HorizontalAlignment = Rjb.import 'com.itextpdf.layout.properties.HorizontalAlignment'
Image = Rjb.import 'com.itextpdf.layout.element.Image'
ImageDataFactory = Rjb.import 'com.itextpdf.io.image.ImageDataFactory'
PdfAcroForm = Rjb.import 'com.itextpdf.forms.PdfAcroForm'
Expand All @@ -19,6 +19,6 @@ module ITEXT
PdfReader = Rjb.import 'com.itextpdf.kernel.pdf.PdfReader'
PdfWriter = Rjb.import 'com.itextpdf.kernel.pdf.PdfWriter'
Rectangle = Rjb.import 'com.itextpdf.kernel.geom.Rectangle'
VerticalAlignment = Rjb.import 'com.itextpdf.layout.property.VerticalAlignment'
VerticalAlignment = Rjb.import 'com.itextpdf.layout.properties.VerticalAlignment'
end
end
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.3'
VERSION = '0.9.4'
end
4 changes: 2 additions & 2 deletions test/pdf_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ def test_that_an_error_is_thrown_for_non_existing_file
end

def test_that_file_has_editable_fields
assert @pdf.any_fields?
assert_predicate @pdf, :any_fields?
end

def test_that_file_has_a_positive_number_of_editable_fields
assert @pdf.num_fields.positive?
assert_predicate @pdf.num_fields, :positive?
end

def test_that_hash_can_be_accessed
Expand Down

0 comments on commit 0b13942

Please sign in to comment.