Skip to content

v0.8.1

Choose a tag to compare

@dkulyk dkulyk released this 04 Sep 11:27
· 36 commits to main since this release
b742133

Added

  • getMainDocumentPart() returns the part targeted by the package-level officeDocument relationship, and open() accepts an expecting content type, or list of them, that the main document part must match. The library does not enumerate document kinds; callers pass the content types they support and get UnsupportedFileFormatException for anything else. The check reads the package relationships directly and runs before part names are validated and indexed, so rejecting a 1000-part package of the wrong kind costs about 2.5 ms instead of the 3.1 ms a full open takes.

Fixed

  • A ZIP archive without [Content_Types].xml, such as an OpenDocument file or a plain archive, is no longer detected as an OPC package. detect() reports it as Unknown and open() throws UnsupportedFileFormatException instead of the generic OpenXmlException it raised after opening the archive.

See the full changelog.