HexaPDF v0.24.0 Release Notes

Release Date: 2022-08-01 // 2 months ago
  • โž• Added

    • [HexaPDF::Layout::ListBox] for rendering ordered and unordered lists
    • [HexaPDF::Layout::ColumnBox] for rendering content inside columns
    • [HexaPDF::Layout::BoxFitter] for placing boxes into multiple frames
    • ๐Ÿ†• New configuration option 'debug' for enabling debug output
    • ๐Ÿšš [HexaPDF::Document::Pages#move] for moving pages around the same document
    • [HexaPDF::Composer#box] for drawing arbitrary, registered boxes
    • [HexaPDF::Layout::Box#split_box?] for determining whether a box is a split box, i.e. the continuation of another box
    • [HexaPDF::Document::Layout::ChildrenCollector] to provide an easy method for defining children boxes of a container box

    ๐Ÿ”„ Changed

    • ๐Ÿ’ฅ Breaking change: Refactored [HexaPDF::Layout::Frame] and associated data structures so that the complete result of fitting a box is returned
    • ๐Ÿ‘ [HexaPDF::Layout::Frame] to use a better algorithm for trimming the shape
    • [HexaPDF::Layout::Frame::new] to allow setting the initial shape
    • ๐Ÿ’ฅ Breaking change: Removed contour line from [HexaPDF::Layout::Frame]
    • ๐Ÿ’ฅ Breaking change: Changed positional arguments of [HexaPDF::Layout::TextBox::new] and [HexaPDF::Layout::ImageBox::new] to keyword arguments for a consistent box initialization interface
    • 0๏ธโƒฃ [HexaPDF::Layout::Box#split] to provide a default implementation that is useful for most subclasses
    • Layout box implementations to provide a #supports_position_flow? method that indicates whether the box supports flowing its content around other content.
    • hexapdf info --check to only check the current version of each object
    • [HexaPDF::Writer] to make sure the producer information is written when writing the file incrementally

    ๐Ÿ›  Fixed

    • [HexaPDF::Layout::TextLayouter] to freeze the new items when a text fragment needs to be split
    • [HexaPDF::Layout::TextLayouter] to avoid the possible splitting of a text fragment if there would not be enough height left anyway
    • [HexaPDF::Layout::WidthFromPolygon] to work correctly in case of very small floating point errors
    • HexaPDF::Layout::TextFragment#inspect to work in case of interspersed numbers
    • [HexaPDF::Layout::TextBox#split] to work for position :flow when box is wider than the initial available width
    • [HexaPDF::Layout::Frame#fit] to create minimally sized mask rectangles
    • [HexaPDF::Content::GraphicObject::Geom2D] to close the path when drawing polygons
    • [HexaPDF::Layout::WidthFromPolygon] to work for all counterclockwise polygons
    • ๐Ÿšš [HexaPDF::Type::PageTreeNode#move_page] to work in case the parent node of the moved node doesn't change
    • ๐Ÿšš [HexaPDF::Type::PageTreeNode#move_page] to use the correct target position when the moved node is before the target position
    • [HexaPDF::Document::Signatures#add] to work in case the signature object is the last object written
    • CLI command hexapdf inspect to show correct byte range of the last revision
    • [HexaPDF::Writer#write_incremental] to only use a cross-reference stream if a revision directly used one and not through an /XRefStm entry
    • ๐Ÿ’Ž [HexaPDF::Encryption::FastARC4] to use RubyARC4 as fallback if OpenSSL has RC4 disabled
    • [HexaPDF::Font::Encoding::GlyphList] to use binary reading to avoid problems on Windows
    • [HexaPDF::Document::Signatures#add] to use binary writing to avoid problems on Windows

Previous changes from v0.23.0

  • โž• Added

    • [HexaPDF::Composer#create_stamp] for creating a form Xobject
    • [HexaPDF::Revision#reset_objects] for deleting all live loaded and added objects
    • ๐Ÿ‘Œ Support for removing or flattening annotations to the hexapdf modify command
    • Option to CLI command hexapdf form to allow generation of a template file
    • ๐Ÿ‘Œ Support for centering a floating box in [HexaPDF::Layout::Frame]
    • [HexaPDF::Type::Catalog#names] for easier access to the name dictionary
    • [HexaPDF::Type::Names#destinations] for easier access to the destinations name tree
    • [HexaPDF::Document::Destinations], accessible via [HexaPDF::Document#destinations], as convenience interface for working with destination arrays

    ๐Ÿ”„ Changed

    • ๐Ÿ’ฅ Breaking change: Refactored the [HexaPDF::Document] interface for working with objects and move parts into [HexaPDF::Revisions]
    • ๐Ÿ’ฅ Breaking change: [HexaPDF::Layout::TextBox] to use whole available width when aligning to the center or right
    • ๐Ÿ’ฅ Breaking change: [HexaPDF::Layout::TextBox] to use whole available height when vertically aligning to the center or bottom
    • CLI command hexapdf inspect to show the type of revisions, as well as the number of objects per revision
    • โšก๏ธ [HexaPDF::Task::Optimize] to allow skipping invalid content stream operations
    • [HexaPDF::Composer#image] to allow using a form xobject in place of the image

    ๐Ÿ›  Fixed

    • [HexaPDF::Writer#write] to write modified objects into the correct revision
    • [HexaPDF::Revisions::from_io] to correctly handle hybrid-reference files
    • [HexaPDF::Writer] to assign a valid object number to a created cross-reference stream in all cases
    • [HexaPDF::Type::AcroForm::TextField] to validate the existence of a /MaxLen value for comb text fields
    • [HexaPDF::Type::AcroForm::TextField#field_value=] to check for the existence of /MaxLen when setting a value for a comb text field
    • [HexaPDF::Type::AcroForm::TextField#field_value=] to check the value against /MaxLen
    • ๐Ÿ’… [HexaPDF::Layout::TextLayouter#fit] to not use style valign when doing variable width layouting
    • [HexaPDF::Utils::SortedTreeNode#find_entry] to work in case of a node without a container name or kids key
    • CLI command hexapdf form to allow setting array values when using a template
    • CLI command hexapdf form to allow setting file select fields