GroupDocs.Metadata for Java 26.11 Release Notes

Major features, enhancements and fixes

New formats. Version 26.11 reads metadata from eight more formats:

  • five archive formats: Apple Archive (AAR), GZIP, BZ2, XZ and Zstandard;
  • OGG Vorbis audio;
  • FictionBook 2 (FB2) e-books;
  • MOBI e-books, where the book’s full name can also be edited.

Loading from a URI. Two new Metadata constructors load a document straight from a java.net.URI, so you no longer need to download the file yourself.

Email messages. MSG files expose about 30 more MAPI properties. Several existing ones can now be edited, among them the body, the categories, the delivery and submit times, and the headers. EML attachments can be edited too.

Sanitizing PDF documents. Metadata.sanitize() now also removes attachments, bookmarks, form fields and digital signatures from PDF documents, not only annotations.

Fixes.

  • Previews of CAD drawings were empty.
  • Some archives and AVIF images were recognized as MP3, MOV or HEIF files.
  • The bundled Aspose libraries are updated to current versions.

Full list of changes in this release

IDSummaryCategory
METADATANET-4251Support GZIP, BZ2, XZ and Zstandard archive formatsFeature
METADATAJAVASupport the Apple Archive (AAR) formatFeature
METADATANET-4083Support the OGG (Vorbis) audio formatFeature
METADATANET-4077Support the FictionBook 2 (FB2) e-book format (read-only)Feature
METADATAJAVASupport the MOBI e-book formatFeature
METADATANET-4094Load documents from web resources with the new Metadata(URI) constructorsFeature
METADATANET-4121MSG: Internet message ID, billing, HTML and RTF body; EML: editable attachmentsFeature
METADATANET-4123, METADATANET-4124MSG: conversation topic, display names, encryption and signature flags, sender and “sent representing” addresses, reply-to, read receipt and other MAPI propertiesFeature
METADATANET-4110, METADATANET-4111Email: getSenderEmailAddress(), editable MSG sender name, body and categoriesEnhancement
METADATANET-4099MSG: editable delivery time, client submit time and headersEnhancement
METADATAJAVAEmailHeaderPackage.set(String, PropertyValue) adds or updates an email headerEnhancement
METADATAJAVAWordProcessing: HyperlinksChanged, ScaleCrop and SharedDoc propertiesEnhancement
METADATANET-4139Metadata.sanitize() removes PDF attachments, bookmarks, form fields and digital signaturesEnhancement
METADATANET-4140New tags Tags.getTime().getDelivery() and Tags.getTool().getCompression(); more properties are taggedEnhancement
METADATAJAVA-718Aspose libraries updated: Words 26.8, Cells 26.9, Slides 26.9, PDF 26.8.1, Email 26.8, CAD 26.8, PSD 26.8, Diagram 26.9, Barcode 26.6, Imaging 25.12, ZIP 26.7Enhancement
METADATAJAVAPreviews of CAD drawings were emptyFix
METADATAJAVARAR, 7z and TAR archives could be recognized as MP3 filesFix
METADATAJAVAAVIF images could be recognized as MP3, MOV or HEIF filesFix
METADATAJAVASmaller fixes: equals/hashCode consistency of raw tags, null-safe JSON import, overflow in size arithmetic, closed streams after ZIP packingFix

Public API and backward incompatible changes

New archive formats: AAR, GZIP, BZ2, XZ and Zstandard

The new FileType constants are AAR, GZIP (.gz), BZ2, XZ and ZSTD (.zst). Each one comes with a root package that is read-only:

FormatRoot packagePackage
AARAarRootPackageAarPackage: total entries, solid flag, and AarFile entries with name, length and directory flag
GZIPGzipRootPackageGzipPackage: name, total entries, compressed and uncompressed size
BZ2Bz2RootPackageBz2Package: name, total entries, size
XZXzRootPackageXzPackage: name, total entries, size
ZstandardZstdRootPackageZstdPackage: name, total entries, size
try (Metadata metadata = new Metadata("backup.gz")) {
    GzipRootPackage root = metadata.getRootPackageGeneric();
    GzipPackage gzip = root.getGzipPackage();

    System.out.println(gzip.getName());
    System.out.println(gzip.getSize());
    System.out.println(gzip.getUncompressedSize());
}

OGG Vorbis audio

FileType.OGG and OggRootPackage.getOggPackage() were added. OggPackage reads the following Vorbis comment fields:

  • title, album, track number, artist, performer, genre and date;
  • copyright, license, organization, description, location, contact and ISRC;
  • the vendor string and the version;
  • any remaining comments, through getOggUserComments().
try (Metadata metadata = new Metadata("track.ogg")) {
    OggRootPackage root = metadata.getRootPackageGeneric();
    OggPackage ogg = root.getOggPackage();

    System.out.println(ogg.getArtist() + " - " + ogg.getTitle());
    for (OggUserComment comment : ogg.getOggUserComments()) {
        System.out.println(comment.getHeader() + " = " + comment.getValue());
    }
}

FictionBook 2 (FB2) e-books

FileType.FB2 and Fb2RootPackage.getFb2Package() were added; the format is read-only. Fb2Package has four sections:

  • the title info and the source title info (Fb2TitleInfo): book title, authors, genres, keywords, language and sequence;
  • the document info (Fb2DocumentInfo);
  • the publish info (Fb2PublishInfo).

MOBI e-books

FileType.MOBI and MobiRootPackage.getMobiPackage() were added.

  • MobiPackage exposes the PDB header (PDBHeader) and the MOBI header (MobiHeader).
  • The full name of the book can be edited with MobiHeader.setFullName(String).

Loading from a URI

public Metadata(java.net.URI uri)
public Metadata(java.net.URI uri, LoadOptions loadOptions)

The document is downloaded into memory and then loaded the same way as from a stream.

Email messages

  • EmailPackage.getSenderEmailAddress() was added. EmailPackage.getSender() is deprecated and returns the same value.
  • In the property list, the sender property is now named SenderEmailAddress instead of Sender. Code that looks the property up by name has to use the new name.
  • EmailPackage.setHeaders(EmailHeaderPackage) and EmailHeaderPackage.set(String, PropertyValue) were added.
  • EmlPackage.getAttachments() and EmlPackage.setAttachments(EmailAttachmentPackage[]) were added.
  • MsgPackage gains the following properties:
    • editable: Body, Categories, SenderName, DeliveryTime, ClientSubmitTime, Billing, BodyHtml, BodyRtf, ReplyTo, ReadReceiptRequested, SenderSmtpAddress, SentRepresentingEmailAddress, SentRepresentingName, Mileage, Attachments;
    • read-only: InternetMessageId, ConversationTopic, DisplayBcc, DisplayCc, DisplayName, DisplayNamePrefix, DisplayTo, NormalizedSubject, SubjectPrefix, SenderAddressType, SentRepresentingAddressType, SentRepresentingSmtpAddress, TransportMessageHeaders, and the flags isEncrypted(), isSigned() and isTemplate().
try (Metadata metadata = new Metadata("message.msg")) {
    MsgRootPackage root = metadata.getRootPackageGeneric();
    MsgPackage msg = root.getMsgPackage();

    System.out.println(msg.getInternetMessageId());
    msg.setSenderName("Support Team");
    msg.setCategories(new String[] { "Reviewed" });

    metadata.save("message-updated.msg");
}

WordProcessing documents

WordProcessingPackage gains three properties that can be read and edited:

  • HyperlinksChanged
  • ScaleCrop
  • SharedDoc

Tags

  • Tags.getTime().getDelivery() marks the delivery time of messages.
  • Tags.getTool().getCompression() marks the compression settings of ZIP, PNG and PSD files.

Both tags can be used with ContainsTagSpecification in Metadata.findProperties.

Behavior changes

  • PDF sanitizing removes more. Metadata.sanitize() now removes annotations, attachments, bookmarks, form fields and digital signatures from PDF documents. Before 26.11 it removed annotations only. If a sanitized PDF has to keep these items, do not call sanitize() on it; remove only the properties you need.

  • Archives are recognized by their extension. RAR, 7z, TAR and the new archive formats are recognized by the file extension:

    • RAR: .rar and .cbr;
    • 7z: .7z and .cb7;
    • TAR: .tar and .cbt;
    • the new formats: .aar, .gz/.gzip, .bz2, .xz, .zst/.zstd.

    An archive loaded from an InputStream or a URI therefore needs its format set explicitly:

    try (Metadata metadata = new Metadata(inputStream, new LoadOptions(FileFormat.Rar))) {
        // ...
    }
    
  • MPEG audio headers are read-only. MpegAudioPackage describes the audio stream, so its properties can no longer be changed through the property API. Examples are the MPEG version, channel mode, bitrate and frequency.