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
| ID | Summary | Category |
|---|---|---|
| METADATANET-4251 | Support GZIP, BZ2, XZ and Zstandard archive formats | Feature |
| METADATAJAVA | Support the Apple Archive (AAR) format | Feature |
| METADATANET-4083 | Support the OGG (Vorbis) audio format | Feature |
| METADATANET-4077 | Support the FictionBook 2 (FB2) e-book format (read-only) | Feature |
| METADATAJAVA | Support the MOBI e-book format | Feature |
| METADATANET-4094 | Load documents from web resources with the new Metadata(URI) constructors | Feature |
| METADATANET-4121 | MSG: Internet message ID, billing, HTML and RTF body; EML: editable attachments | Feature |
| METADATANET-4123, METADATANET-4124 | MSG: conversation topic, display names, encryption and signature flags, sender and “sent representing” addresses, reply-to, read receipt and other MAPI properties | Feature |
| METADATANET-4110, METADATANET-4111 | Email: getSenderEmailAddress(), editable MSG sender name, body and categories | Enhancement |
| METADATANET-4099 | MSG: editable delivery time, client submit time and headers | Enhancement |
| METADATAJAVA | EmailHeaderPackage.set(String, PropertyValue) adds or updates an email header | Enhancement |
| METADATAJAVA | WordProcessing: HyperlinksChanged, ScaleCrop and SharedDoc properties | Enhancement |
| METADATANET-4139 | Metadata.sanitize() removes PDF attachments, bookmarks, form fields and digital signatures | Enhancement |
| METADATANET-4140 | New tags Tags.getTime().getDelivery() and Tags.getTool().getCompression(); more properties are tagged | Enhancement |
| METADATAJAVA-718 | Aspose 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.7 | Enhancement |
| METADATAJAVA | Previews of CAD drawings were empty | Fix |
| METADATAJAVA | RAR, 7z and TAR archives could be recognized as MP3 files | Fix |
| METADATAJAVA | AVIF images could be recognized as MP3, MOV or HEIF files | Fix |
| METADATAJAVA | Smaller fixes: equals/hashCode consistency of raw tags, null-safe JSON import, overflow in size arithmetic, closed streams after ZIP packing | Fix |
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:
| Format | Root package | Package |
|---|---|---|
| AAR | AarRootPackage | AarPackage: total entries, solid flag, and AarFile entries with name, length and directory flag |
| GZIP | GzipRootPackage | GzipPackage: name, total entries, compressed and uncompressed size |
| BZ2 | Bz2RootPackage | Bz2Package: name, total entries, size |
| XZ | XzRootPackage | XzPackage: name, total entries, size |
| Zstandard | ZstdRootPackage | ZstdPackage: 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.
MobiPackageexposes 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
SenderEmailAddressinstead ofSender. Code that looks the property up by name has to use the new name. EmailPackage.setHeaders(EmailHeaderPackage)andEmailHeaderPackage.set(String, PropertyValue)were added.EmlPackage.getAttachments()andEmlPackage.setAttachments(EmailAttachmentPackage[])were added.MsgPackagegains 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 flagsisEncrypted(),isSigned()andisTemplate().
- editable:
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:
HyperlinksChangedScaleCropSharedDoc
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 callsanitize()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:
.rarand.cbr; - 7z:
.7zand.cb7; - TAR:
.tarand.cbt; - the new formats:
.aar,.gz/.gzip,.bz2,.xz,.zst/.zstd.
An archive loaded from an
InputStreamor aURItherefore needs its format set explicitly:try (Metadata metadata = new Metadata(inputStream, new LoadOptions(FileFormat.Rar))) { // ... }- RAR:
MPEG audio headers are read-only.
MpegAudioPackagedescribes 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.