HexaPDF v0.4.0 Release Notes

Release Date: 2017-03-19 // over 2 years ago
  • ➕ Added

    • [HexaPDF::Type::FontType0] and [HexaPDF::Type::CIDFont] for composite font support
    • 👍 Complete support for CMaps for use with composite fonts; the interface for [HexaPDF::Font::CMap] changed to accomodate this
    • CLI command hexapdf batch for batch execution of a single command for multiple input files
    • 0️⃣ CLI option --verbose for more verbose output; also changed the default verbosity level to only display warnings and not informational messages
    • CLI option --quiet for suppressing additional and diagnostic output
    • 📜 CLI option --strict for enabling strict parsing and validation; also changed the default from strict to non-strict parsing/validation
    • ⚡️ CLI optimization option --optimize-fonts for optimizing embedded fonts
    • Method #word_spacing_applicable? to font types
    • 👌 Support for marked-content points and sequences in [HexaPDF::Content::Canvas]
    • 👌 Support for property lists in a page's resource dictionary
    • 👉 Show file name and size in hexapdf info output
    • [HexaPDF::Type::Font#font_file] for getting the embedded font file
    • ⚡️ [HexaPDF::Font::TrueType::Optimizer] for optimizing TrueType fonts
    • 🔧 Configuration option 'filter.flate_memory' for configuring memory use of the [HexaPDF::Filter::FlateDecode] filter
    • Method [HexaPDF::Content::Canvas#show_glyphs_only] for faster glyph showing without text matrix calculations
    • Methods for caching expensive computations of PDF objects ([HexaPDF::Document#cache] and others)

    🔄 Changed

    • Enabled in-place processing of PDF files for all CLI commands
    • ⚠ Show warning instead of exiting when extracting images with hexapdf images and an image format is not supported
    • Handling of character code to Unicode mapping:
      • [HexaPDF::Font::CMap#to_unicode], [HexaPDF::Font::Encoding::Base#unicode] and [HexaPDF::Font::Encoding::GlyphList#name_to_unicode] return nil instead of an empty string
      • Font dictionaries use the new configuration option 'font.on_missing_unicode_mapping' in their #to_utf8 method
    • 🔧 [HexaPDF::Configuration#constantize] to raise error if constant is not found
    • 🏗 Extracted TrueType font file building code into new module [HexaPDF::Font::TrueType::Builder]
    • [HexaPDF::Filter::FlateDecode] filter to use pools of Zlib inflaters and deflaters to conserve memory

    🛠 Fixed

    • 👉 Use of wrong glyph IDs for glyph width entries and unicode mapping for subset TrueType fonts
    • Invalid document reference when importing wrapped direct objects with [HexaPDF::Importer]
    • Invalid type of /DW key in CIDFont dictionary when embedding TrueType fonts
    • Caching problem in [HexaPDF::Document::Fonts] which lead to multiple instances of the same font
    • 🐛 Bug in handling of word spacing with respect to offset calculations when showing or extracting text
    • 🔀 Incorrect handling of page rotation values in hexapdf merge
    • Missing handling of certain rotation values in hexapdf modify
    • Removal of unused pages in hexapdf modify
    • Handling of invalid page numbers in CLI commands
    • 👉 Useless multiple extraction of the same image in hexapdf images
    • Type of /VP entry of [HexaPDF::Type::Page]
    • 📜 Parsing of inline images that contain the end-of-image marker
    • High memory usage due to not closing Zlib::Stream objects in [HexaPDF::Filter::FlateDecode]