HexaPDF v0.9.0 Release Notes

Release Date: 2018-12-31 // 11 months ago
  • ➕ Added

    • [HexaPDF::Composer] for composing PDF documents in a high-level way
    • 👍 Incremental writing support (i.e. appending a single revision with all the changes to an existing document) to [HexaPDF::Writer] and [HexaPDF::Document]
    • CLI command hexapdf split to split a PDF file into individual pages
    • 📜 [HexaPDF::Revisions#parser] for accessing the parser object that is created when a document is read from an IO stream
    • [HexaPDF::Document#each] argument only_loaded for iteration over loaded objects only
    • [HexaPDF::Document#validate] argument only_loaded for validating only loaded objects
    • [HexaPDF::Revision#each_modified_object] for iterating over all modified objects of a revision
    • [HexaPDF::Layout::Box#split] and [HexaPDF::Layout::TextBox#split] for splitting a box into two parts
    • ✅ [HexaPDF::Layout::Frame#full?] for testing whether the frame has any space left
    • [HexaPDF::Layout::Style] property last_line_gap for controlling the spacing after the last line of text
    • HexaPDF::Layout::Box#draw_content for use by subclasses
    • [HexaPDF::Type::Form#width] and [HexaPDF::Type::Form#height] for compatibility with [HexaPDF::Type::Image]
    • [HexaPDF::Layout::ImageBox] for displaying an image inside a frame

    🔄 Changed

    • [HexaPDF::Revision#each] to allow iteration over loaded objects only
    • [HexaPDF::Document#each] method argument from current to only_current
    • [HexaPDF::Object#==] and [HexaPDF::Reference#==] so that Object and Reference objects can be compared
    • ♻️ Refactored [HexaPDF::Layout::Frame] to allow separate fitting, splitting and drawing of boxes
    • 💅 [HexaPDF::Layout::Style::LineSpacing::new] to allow setting of line spacing via a single hash argument
    • 💅 Made [HexaPDF::Layout::Style] copyable

    🛠 Fixed

    • 🔧 Configuration so that annotation objects are correctly mapped to classes
    • 🛠 Fix problem with [HexaPDF::Filter::Predictor] due to behaviour change of Ruby 2.6.0 in String#setbyte
    • Fitting of [HexaPDF::Layout::TextBox] when the box has padding and/or borders
    • Fitting of [HexaPDF::Layout::TextBox] when width and/or height has been set
    • Fitting of absolutely positioned boxes in [HexaPDF::Layout::Frame]
    • 🛠 Fix bug in variable width line wrapping due to not considering line spacing correctly ([HexaPDF::Layout::Line::HeightCalculator#simulate_height] return value needed to be changed for this fix)