Skip to content

v1.0.0

Choose a tag to compare

@vkononov vkononov released this 22 Nov 07:39
4bd0067
  • Updated iText to v9.4.0 and SLF4J to v2.0.17.
  • Introduced custom error classes to make error handling more precise and predictable. Instead of raising generic Ruby errors, the gem now raises specific exceptions like FillablePDF::FieldNotFoundError when a field doesn't exist or FillablePDF::InvalidArgumentError for invalid input.
  • All methods that modify PDF fields now return self to enable method chaining, allowing you to chain multiple operations together like pdf.set_field(:name, "John").set_field(:email, "john@example.com").save.

Breaking Changes

  • Custom error classes replace standard Ruby errors. Methods now raise FillablePDF::FieldNotFoundError, FillablePDF::InvalidArgumentError, or FillablePDF::FileOperationError instead of RuntimeError, ArgumentError, or IOError.
  • num_fields is deprecated in favour of field_count. The old method still works but will show a deprecation warning.
  • All setter methods (set_field, set_fields, set_image, set_image_base64, rename_field, remove_field, save, save_as) now return self for method chaining instead of other values.
  • Added closed? method to check if a PDF document is closed.
  • Added save_as! method that raises an error if you try to overwrite the currently open file.