Skip to content

Releases: danielklecha/SharpIppNext

v4.1.3

Choose a tag to compare

@github-actions github-actions released this 09 Jul 13:53

Full Changelog: v4.1.2...v4.1.3

v4.1.2

Choose a tag to compare

@github-actions github-actions released this 08 Jul 20:30

Full Changelog: v4.1.1...v4.1.2

v4.1.1

Choose a tag to compare

@github-actions github-actions released this 29 Jun 20:43

What's Changed

🚀 Features & Enhancements

  • Improve IppRequestContent to return Content-Length header in #35

⚡ Core & Performance Improvements

  • Implement asynchronous IPP binary reader and writer (IppBinaryReader / IppBinaryWriter) to improve non-blocking I/O serialization performance.

📚 Documentation

  • Add detailed documentation pages for over 15 client operations.
  • Add new "Configuration and Best Practices" guide.
  • Update README.md and SECURITY.md.

Full Changelog: v4.1.0...v4.1.1

v4.1.0

Choose a tag to compare

@github-actions github-actions released this 21 Jun 20:28

Release Notes: v4.1.0

This release focuses on memory efficiency, protocol parsing robustness, CPU architecture compatibility, and protection against Denial-of-Service (DoS) vectors when processing IPP messages.

🚀 Key Improvements & Features

1. Memory Efficiency & Streaming Output

  • Zero-Buffer HTTP Content Streaming: Introduced IppRequestContent, a custom HttpContent implementation that serializes IPP requests directly into the network stream. This avoids buffering the entire serialized payload in memory before transmission, significantly lowering memory consumption when sending large print jobs.
  • Document Stream Size Limits: Added a configurable limit (MaxDocumentStreamBytes, defaulting to 128 MB) to cap incoming document payloads and prevent out-of-memory errors on large print jobs. Exceeding this limit returns a ClientErrorRequestEntityTooLarge IPP error.

2. Robustness & Security (DoS Protections)

  • Attribute Parsing Constraints: To protect against malformed or hostile payloads, new configurable boundaries have been introduced on IIppProtocol:
    • MaxMessageAttributesCount (defaults to 5,000 attributes) caps the maximum number of attributes parsed in a single message.
    • MaxMessageAttributesBytes (defaults to 10 MB) caps the total byte size of the attributes section.
  • Parser Validation Enhancements:
    • Enforced collection tag matching: the parser now throws an error if an EndCollection tag is encountered without a matching BegCollection tag.
    • Added validation for length parameters during parsing to safeguard against negative or truncated values.
    • Internal parser failures (such as EndOfStreamException) are now gracefully wrapped and returned as structured IppRequestException exceptions with ClientErrorBadRequest status codes.

3. Compatibility & Bug Fixes

  • Non-Seekable Stream Compatibility: Removed all dependencies on Stream.Length and Stream.Position when parsing extended or unknown values. The IPP parser can now safely parse incoming data directly from forward-only, non-seekable streams (like network/socket streams) without throwing NotSupportedException.
  • Platform Endianness Fix: Fixed a platform-dependent bug in IppVersion conversion. Previously, the converter relied on BitConverter, which is CPU-endianness dependent. It now uses explicit bitwise operations to guarantee consistent big-endian layout on all processor architectures.

Full Changelog:
v4.0.2...v4.1.0

v4.0.2

Choose a tag to compare

@github-actions github-actions released this 05 Jun 21:24

Bug Fixes

  • Mapping: Added support for mapping from Range to bool (fixes a runtime mapping crash when a printer returns page-ranges-supported as a range/integer range rather than a boolean value).

Full Changelog:
v4.0.1...v4.0.2

v4.0.1

Choose a tag to compare

@github-actions github-actions released this 31 May 20:40

What's Changed

🚀 Features & Protocol Alignment

  • Support for Range-based Media Dimensions: Changed XDimension and YDimension properties in the MediaSize class from int? to Range?.
    • IPP specifications permit media size dimensions to be represented either as a single integer value or a range of integers (rangeOfInteger).
    • The serialization logic in MediaSizeProfile now automatically maps dimensions to either Tag.Integer (if the range boundaries are identical) or Tag.RangeOfInteger (if the boundaries differ).

🛡️ Validation

  • New IppRangeAttribute: Introduced a new custom validation attribute in IppRangeAttribute.cs to validate both numeric and Range-based property values (as well as collections of ranges) within specified boundaries.

🔄 Backwards Compatibility & Migration

  • Implicit Operator Support: Added an implicit converter from int to Range in Range.cs:
  public static implicit operator Range(int value) => new(value, value);

Full Changelog:
v4.0.0...v4.0.1

v4.0.0

Choose a tag to compare

@github-actions github-actions released this 31 May 18:34

What's Changed

Version 4.0.0 is a major release featuring extensive specification coverage expansion, native Ahead-of-Time (AOT) compilation compatibility, transition to strongly-typed smart enums for IPP keyword attributes, and architectural API cleanups.

⚠️ Breaking Changes

  • Validator Constructor Removal:
    Validators (e.g. IIppRequestMessageValidator, IIppRequestValidator, etc.) have been removed from the constructor signatures of SharpIppClient and SharpIppServer. Instead, they are now exposed as configurable public properties (RequestMessageValidator, RequestValidator, etc.) pre-populated with standard default instances.
  • Strongly-Typed Keywords (Smart Enums):
    Standard IPP keyword attributes previously represented by arbitrary strings are now forced to use strongly-typed Smart Enums (e.g., PrintColorMode, Compression, JobStateReason, Sides, MediaSource).
  • Attributes Renaming:
    Unified and renamed generic attribute constants (e.g., JobAttributes was renamed to IppAttributeNames to match standard raw attribute lookup structures).
  • Operation Obsoletions:
    Marked deprecated or obsolete client operations with [Obsolete] attributes in ISharpIppClient to align with RFC 2911, PWG 5100.5, PWG 5100.7, and PWG 5100.18. This includes:
    • PrintUriAsync (Print-URI)
    • SendUriAsync (Send-URI)
    • DeleteDocumentAsync (Delete-Document)
    • ReprocessJob (Reprocess-Job)

🚀 Features & Enhancements

1. Native AOT & Trimming Support

  • Enabled Native AOT compatibility flags (IsAotCompatible and IsTrimmable) for assemblies targeting .NET 8.0/10.0.
  • Integrated ILLink.Descriptors.xml to preserve essential request, response, mapping, and validation models against IL trimming.
  • Added a Native AOT sample client and configured pipeline test runs to guarantee compatibility.

2. Deep Specification Parity Expansion

Massive implementation of attributes, operations, and models up to PWG 5100.22 (System Service v1.1), covering:

  • PWG 5100.1 (Finishings)
  • PWG 5100.2 (Output Bin)
  • PWG 5100.3 (Production Printing)
  • PWG 5100.5 (Document Object)
  • PWG 5100.6 (Page Overrides)
  • PWG 5100.7 (Job Extensions)
  • PWG 5100.8 (Actual Attributes)
  • PWG 5100.9 (Printer State)
  • PWG 5100.11 (Job/Printer Set 2)
  • PWG 5100.13 (System Service)
  • PWG 5100.15 (FaxOut Service)
  • PWG 5100.16 (Transaction Printing)
  • PWG 5100.17 (3D Printing)
  • PWG 5100.18 (Infrastructure)
  • PWG 5100.21 (HTTP/2)
  • PWG 5100.22 (System Service v1.1)
  • Added support for PWG 5101.2 (Repertoire), PWG 5102.4 (Platform Mgmt), and PWG 5107.2 (Command Line Tool).

3. Smart Enum Refactoring

  • Renamed IKeywordSmartEnum to IMarkedSmartEnum and introduced new smart enums to model IPP keywords safely.
  • Implemented INoValueWritable and IIppStructuredString interfaces.
  • Integrated structured mappings for handling NoValue to bool and other nullable/empty keyword conversions.

4. Custom Validation Attributes

  • Implemented ItemRangeAttribute, ByteRangeAttribute, and ByteMultiRangeAttribute to support structured validation constraints on IPP request fields.

Full Changelog: v3.0.0...v4.0.0

Thank you to everyone for your continued support! Feel free to open an issue or discussion if you encounter any bumps during the upgrade.

v3.0.0

Choose a tag to compare

@github-actions github-actions released this 27 Feb 20:12

This version has a lot of improvements and breaking changes so I decided to change version number to 3.

  1. All typed response classes was rewrote based on specification. You don't need to search section but use properties for all attributes.
  2. Unsupported flag was removed from enums - int.MinValue or short.MinValue will be equivalent.
  3. Documentation was extended and describes requests, responses and advanced scenarios.
  4. Tests cover 100% of the code!

What's Changed

  • Add more printer attributes, fix length of StringWithLanguage, enhance IppProtocol class by @pkocsis-kfx in #27

New Contributors

Full Changelog: v2.2.0...v3.0.0

v2.2.0

Choose a tag to compare

@github-actions github-actions released this 06 Feb 08:40

Full Changelog: v2.1.6...v2.2.0

v2.1.6

Choose a tag to compare

@github-actions github-actions released this 13 Nov 08:03
f854f92

What's Changed

  • Fixed the character encoding bug causing garbled Chinese characters in IPP attributes. by @fightroad in #23

New Contributors

Full Changelog: v2.1.5...v2.1.6