Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dependency hexapdf to v1 #490

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Mar 22, 2025

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
hexapdf (source) '~> 0.40.0' -> '~> 1.2.0' age adoption passing confidence

Release Notes

gettalong/hexapdf (hexapdf)

v1.2.0

Added
  • Breaking change: Argument compact to [HexaPDF::Document#write] to
    automatically run the 'compact' optimization task
  • [HexaPDF::Document::Annotations], accessible via
    [HexaPDF::Document#annotations], as convenience interface for working with
    annotations
  • [HexaPDF::Type::Annotations::AppearanceGenerator] as central class for
    generating appearance streams
  • [HexaPDF::Type::Annotations::Line] for line annotations
  • [HexaPDF::Type::Annotation#opacity] for setting the opacity values when
    regenerating the appearance stream
  • [HexaPDF::Type::Annotation#contents] for setting the text of the annotation
  • Configuration option 'acro_form.text_field.on_max_len_exceeded' to allow
    custom handling of too long values
Changed
  • Breaking change: Extracted #border_style and associated data class from
    [HexaPDF::Type::Annotations::Widget] into
    [HexaPDF::Type::Annotations::BorderStyling]
  • [HexaPDF::Type::Form#canvas] to allow getting the canvas without the initial
    translation
Fixed
  • AcroForm Javascript actions to gracefully handle the special values infinity
    and NaN
  • Type1 and TrueType font wrappers to handle the case where fonts are first
    added and later deleted

v1.1.1

Fixed
  • Missing require statements leading to problems loading type classes

v1.1.0

Added
  • Basic type classes for logical structure support
Changed
  • Optimized output of simple borders to avoid unnecessary drawing operations
Fixed
  • Type of field /DW for CIDFont which used to be Integer in PDF 1.7 but now is
    Numeric inf 2.0
  • Validation of /ProcSet entry in resources dictionary to correctly handle the
    case of /ProcSet having a Symbol value

v1.0.3

Fixed
  • Offsets and lengths of revisions shown using the inspect rev CLI command for
    linearized PDF files
  • [HexaPDF::Type::AcroForm::Form#recalculate_fields] to only consider real
    fields

v1.0.2

Added
  • [HexaPDF::Type::CMap] for representing CMap streams
Fixed
  • Checksum calculation for TrueType tables
  • Automatic wrapping of dictionary entry /CIDToGIDMap for CID fonts
  • Performance regression when encoding char codes for TrueType fonts
  • PDF/A validation regression for PDFs using TrueType fonts

v1.0.1

Changed
  • Informational output on errors when running CLI commands to provide more
    details
Fixed
  • Parsing of indirect objects the value of which is an indirect reference
  • Writing of the initial cross-reference section to ensure a single subsection
  • [HexaPDF::Utils::SortedTreeNode] to wrap all /Kids entries with the correct
    type class

v1.0.0

Added
  • [HexaPDF::Task::MergeAcroForm] for merging AcroForm information for imported
    pages
  • [HexaPDF::Document#write_to_string] and [HexaPDF::Composer#write_to_string]
    for easily writing a document to a String
  • [HexaPDF::Font::CMap::Writer#create_cid_cmap] for creating a character code to
    CID CMap file
Changed
  • [HexaPDF::Type::AcroForm::Form] text-like field creation methods to always set
    a default appearance string and the quadding
  • Convenience methods for accessing resources to not add the deprecated /ProcSet
    entry by default
  • [HexaPDF::DigitalSignature::CMSHandler] to add informational output regarding
    the certificate chain on verification
  • Validation of [HexaPDF::Type::FontType1] to ensure correct /Encoding value
Fixed
  • [HexaPDF::DigitalSignature::Signature#signed_data] to work for invalid offsets
  • [HexaPDF::DigitalSignature::Signing::DefaultHandler] to update the document's
    version to 2.0 when using PAdES
  • Parsing of invalid ) character in PDF objects and content streams
  • Handling of files that contain stream length values that are indirect objects
    that do not exist
  • [HexaPDF::Font::TrueTypeWrapper] to correctly handle the situation when
    multiple codepoints refer to the same glyph ID
  • [HexaPDF::Type::Page#contents] to handle null values in /Contents array

v0.47.0

Added
  • Configuration option 'acro_form.fallback_default_appearance' to allow setting
    a standard default appearance string for a variable text field if none is
    found
  • Support for decrypting files with the proprietary algorithm /R 5
Changed
  • [HexaPDF::Task::Optimize] to not remove optional /Type entries containing
    default values
  • Validation of [HexaPDF::Type::AcroForm::Form] to not add a /DA entry
Fixed
  • [HexaPDF::Layout::TableBox] to correctly calculcate and distribute row
    heights when row spans are involved
  • [HexaPDF::Type::AcroForm::AppearanceGenerator] to work for files where check
    boxes don't define the name of the on state
  • [HexaPDF::Importer#import] to handle null values in all cases
  • [HexaPDF::Type::AcroForm::VariableTextField] to handle parsing of invalid PDFs
    with symbolic appearance strings
  • [HexaPDF::Type::Annotations::Widget#marker_style] to handle invalid /DA values
    with missing font size or color information
  • [HexaPDF::Type::AcroForm::SignatureField#field_value] to always return a
    correctly wrapped object
  • [HexaPDF::Writer] to remove /Type entry from trailer
  • [HexaPDF::Type::AcroForm::AppearanceGenerator#create_text_appearances] to
    handle invalid appearance streams that are not correct Form XObjects

v0.46.0

Added
  • [HexaPDF::DigitalSignature::CMSHandler#embedded_tsa_signature] to return the
    embedded timestamp authority signature if any
  • [HexaPDF::DigitalSignature::Signing::DefaultHandler#signing_time] for setting
    a custom signing time
  • [HexaPDF::Document#duplicate] for making an in-memory copy of a PDF document
  • Configuration option 'font.default' for setting the default font for the
    document layout engine
Changed
  • [HexaPDF::Document::Layout::CellArgumentCollector#[]=] to allow stepped ranges
  • [HexaPDF::Document::Layout::ChildrenCollector] to also return the box when
    creating and adding one to the list
  • [HexaPDF::Layout::InlineBox] to allow usage without predefined width
  • [HexaPDF::DigitalSignature::CMSHandler#verify] to recognize non-repudiation
    signatures
  • [HexaPDF::DigitalSignature::CMSHandler#signing_time] to use time from an
    embedded timestamp authority signature if possible
  • HexaPDF::Layout::Box#fit to return success for boxes with content
    width/height of zero
  • [HexaPDF::Importer::copy] to optionally allow copying the catalog and page
    tree nodes
Fixed
  • Setting of correct x-position in fit result for boxes with flow positioning
  • HexaPDF::Layout::ListBox#fit to respect the set height
  • CLI command hexapdf inspect to work in case of missing Unicde mappings
  • [HexaPDF::Type::AcroForm::Form#delete_field] to correctly work for fields with
    an embedded widget
  • Parsing of "linearized" PDF files where the first cross-reference section
    isn't actually used
  • [HexaPDF::Layout::PageStyle#create_page] to return new frame objects on each
    invocation

v0.45.0

Added
  • [HexaPDF::Document::Layout#styles] and [HexaPDF::Composer#styles] for defining
    multiple styles at once
Changed
  • HexaPDF::Layout::Box#fit to set width/height correctly for boxes with
    position :flow
Fixed
  • Regression in [HexaPDF::Layout::ListBox] that leads to missing markers
  • [HexaPDF::Content::CanvasComposer#draw_box] to handle truncated boxes
  • [HexaPDF::Layout::TableBox::Cell] to handle too-big content in all cases

v0.44.0

Added
  • Support for specifying the MIME type when embedding files
  • Support for adding custom XMP metadata
Changed
  • Breaking change: Refactored the box implementation of the document layout
    system
Fixed
  • Parsing of invalid files with garbage bytes at the end

v0.43.0

Added
  • [HexaPDF::Type::AcroForm::Form#create_namespace_field] for creating a pure
    namespace field
  • [HexaPDF::Type::AcroForm::Form#delete_field] for deleting fields
Changed
  • Minimum Ruby version to be 3.0
  • Breaking change: Renamed HexaPDF::Layout::BoxFitter#fit_successful? to
    [HexaPDF::Layout::BoxFitter#success?]
  • Breaking Change: Removed HexaPDF::Dictionary#to_h
  • Form field creation methods of [HexaPDF::Type::AcroForm::Form] to
    automatically create parent fields as namespace fields
Fixed
  • HexaPDF::Layout::TextBox#fit to correctly calculate width in case of flowing
    text around other boxes
  • HexaPDF::Layout::TextBox#draw to correctly draw border, background... on
    boxes using position 'flow'
  • Comparison of Hash with [HexaPDF::Dictionary] objects by implementing
    #to_hash
  • Parsing of invalid files having multiple end-of-file markers with the last one
    being invalid

v0.42.0

Added
  • Support for the AFPercent_Format JavaScript method
  • Support for the AFTime_Format JavaScript method
  • [HexaPDF::Type::AcroForm::Form#fill] for easily filling out form fields
  • CLI command hexapdf usage for showing space usage information
  • Support for attaching files via hexapdf files CLI command
  • Refinement on [HexaPDF::Utils] to support conversion of Numeric values to
    points (e.g. 5.mm, 5.cm, 5.inch)
Changed
  • [HexaPDF::Type::AcroForm::ButtonField#field_value=] to always allow using
    true for check boxes
  • CLI commands to prompt whether an existing output file should be overwritten
Fixed
  • [HexaPDF::Type::Resources#font] to always return a correctly wrapped font
    object
  • [HexaPDF::Type::AcroForm::TextField#field_value=] to actually use the value
    returned by the call to the config option 'acro_form.on_invalid_value'

v0.41.0

Added
  • Font loader [HexaPDF::FontLoader::VariantFromName] to ease specifying font
    variants
  • [HexaPDF::Type::AcroForm::JavaScriptActions] module to contain all JavaScript
    actions that HexaPDF can handle
  • Support for the AFSimple_Calculate Javascript method
  • Support for Simplified Field Notation for defining Javascript calculations
  • Configuration option 'encryption.on_decryption_error' to allow custom
    decryption error handling
  • CLI option --fill-read-only-fields to hexapdf form to specify whether
    filling in read only fields is allowed
  • [HexaPDF::Type::AcroForm::Field#form_field] to getting the field irrespective
    of whether the object is already a field or a widget
  • [HexaPDF::Type::AcroForm::TextField#set_format_action] for setting a
    JavaScript action that formats the field's value
  • [HexaPDF::Type::AcroForm::TextField#set_calculate_action] for setting a
    JavaScript action that calculates the field's value
  • [HexaPDF::Type::AcroForm::Form#recalculate_fields] for recalculating fields
Changed
  • CLI command hexapdf form to show more information in verbose mode
  • CLI command 'hexapdf form' to show the field flags "read only" and "required"
  • [HexaPDF::Type::AcroForm::AppearanceGenerator] to remove the hidden flag from
    widgets
Fixed
  • [HexaPDF::FontLoader::FromConfiguration] to accept arbitrary keyword arguments
  • [HexaPDF::Font::CMap::Parser] to avoid instantiating invalid UTF-16BE chars
  • [HexaPDF::Type::AcroForm::AppearanceGenerator] to work for files where check
    boxes don't have appearance subdictionaries
  • [HexaPDF::Type::AcroForm::TextField#field_value=] to call the config option
    'acro_form.on_invalid_value' when passing a non-String argument (except nil)
  • [HexaPDF::Type::AcroForm::JavaScriptActions#apply_af_number_format] to
    correctly convert strings using commas or points into numbers
  • [HexaPDF::Type::AcroForm::AppearanceGenerator] to use the field instead of the
    widget object as the source for JavaScript format actions
  • CLI command hexapdf form --generate-template to output fields without values
  • AFNumber_Format JavaScript parsing to work without trailing semicolon

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Copy link

codecov bot commented Mar 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (5b1ce9b) to head (d01bb30).

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #490   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           48        48           
  Lines          670       670           
  Branches        53        53           
=========================================
  Hits           670       670           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants