GroupDocs.Metadata for Java 20.10 Release Notes
Major Features
There are the following features, enhancements and fixes in this release:
- Implement the ability to work with repeatable IPTC properties
- Implement the ability to generate image previews for EPUB files
- Implement the ability to generate image previews for supported CAD formats
- Implement the ability to preview EML and MSG files
- Exception: Could not read the PSD file
Full List of Issues Covering all Changes in this Release
Key | Summary | Category |
---|---|---|
METADATANET-2639 | Implement the ability to work with repeatable IPTC properties | Improvement |
METADATANET-3547 | Implement the ability to generate image previews for EPUB files | Improvement |
METADATANET-3546 | Implement the ability to generate image previews for supported CAD formats | Improvement |
METADATANET-3553 | Implement the ability to preview EML and MSG files | Improvement |
METADATANET-3280 | Exception: Could not read the PSD file | Bug |
Public API and Backward Incompatible Changes
Implement the ability to work with repeatable IPTC properties
This improvement allows the user to add multiple datasets with the same number to an IPTC record
Public API changes
The getByLines method has been added to the IptcApplicationRecord class
The setByLines method has been added to the IptcApplicationRecord class
The getByLineTitles method has been added to the IptcApplicationRecord class
The setByLineTitles method has been added to the IptcApplicationRecord class
The getContentLocationCodes method has been added to the IptcApplicationRecord class
The setContentLocationCodes method has been added to the IptcApplicationRecord class
The getContentLocationNames method has been added to the IptcApplicationRecord class
The setContentLocationNames method has been added to the IptcApplicationRecord class
The getReferenceDates method has been added to the IptcApplicationRecord class
The getContacts method has been added to the IptcApplicationRecord class
The setContacts method has been added to the IptcApplicationRecord class
The getAllKeywords method has been added to the IptcApplicationRecord class
The setAllKeywords method has been added to the IptcApplicationRecord class
The getDestinations method has been added to the IptcEnvelopeRecord class
The setDestinations method has been added to the IptcEnvelopeRecord class
The getProductIds method has been added to the IptcEnvelopeRecord class
The setProductIds method has been added to the IptcEnvelopeRecord class
The add method has been added to the IptcRecordSet class
Use cases
Read repeatable IPTC datasets
try (Metadata metadata = new Metadata("D:\\input.psd")) {
IIptc root = (IIptc) metadata.getRootPackage();
if (root.getIptcPackage() != null) {
for (IptcDataSet dataSet : root.getIptcPackage().toDataSetList()) {
// Check if the dataset is repeatable
if (dataSet.getValue().getType() == MetadataPropertyType.PropertyValueArray) {
System.out.println(dataSet.getRecordNumber());
System.out.println(dataSet.getDataSetNumber());
System.out.println(dataSet.getAlternativeName());
for (PropertyValue value : dataSet.getValue().toArray(PropertyValue.class)) {
System.out.print(String.format("%s, ", value.getRawValue()));
}
System.out.println();
}
}
}
}
Add repeatable IPTC datasets
try (Metadata metadata = new Metadata("D:\\input.psd")) {
IIptc root = (IIptc)metadata.getRootPackage();
// Set the IPTC package if it's missing
if (root.getIptcPackage() == null) {
root.setIptcPackage(new IptcRecordSet());
}
root.getIptcPackage().add(new IptcDataSet((byte)IptcRecordType.ApplicationRecord, (byte)IptcApplicationRecordDataSet.Keywords, "keyword 1"));
root.getIptcPackage().add(new IptcDataSet((byte)IptcRecordType.ApplicationRecord, (byte)IptcApplicationRecordDataSet.Keywords, "keyword 2"));
root.getIptcPackage().add(new IptcDataSet((byte)IptcRecordType.ApplicationRecord, (byte)IptcApplicationRecordDataSet.Keywords, "keyword 3"));
metadata.save("D:\\output.psd");
}
// Check the output file
try (Metadata metadata = new Metadata("D:\\output.psd")) {
IIptc root = (IIptc)metadata.getRootPackage();
MetadataProperty keywordsProperty = root.getIptcPackage().getApplicationRecord().get_Item((byte)IptcApplicationRecordDataSet.Keywords);
for (PropertyValue value : keywordsProperty.getValue().toArray(PropertyValue.class)) {
System.out.println(value);
}
}
Implement the ability to generate image previews for EPUB files
This improvement allows the user to generate image previews for EPUB files
Public API changes
None
Use cases
Implement the ability to generate image previews for supported CAD formats
This improvement allows the user to generate image previews for DWG and DXF files
Public API changes
None
Use cases
Implement the ability to preview EML and MSG files
This improvement allows the user to generate image previews for EML and MSG files
Public API changes
None