GroupDocs.Metadata for Java 24.7 Release Notes
This page contains release notes for GroupDocs.Metadata for Java 24.7
Major Features
There are the following features, enhancements, and fixes in this release:
- Copy method for metadata
- Expanding the list of known properties
- Implement Document Preview options
- Implement FileType.fromExtension method
- Copy method with support tag
Full List of Issues Covering all Changes in this Release
Key | Summary | Category |
---|---|---|
METADATANET-4055 | Implement support for copying metadata. | New Feature |
METADATANET-4060 | Implement Document Preview options PreviewOptions.Resolution property. | New Feature |
METADATANET-4066 | Develop copy method with support tag | New Feature |
METADATANET-4065 | Implement FileType.FromExtension method in public API | New Feature |
Public API and Backward Incompatible Changes
Implement the ability to configure cache for heavy operations
Public API changes
The copyTo method has been added to the com.groupdocs.metadata.Metadata class
The Resolution property has been added to the com.groupdocs.metadata.options.PreviewOptions class
The fromExtension method has been added to the FileType class
Use cases
Copy metadata properties from source file to destination file
Metadata source = new Metadata("D:\\source.pdf");
Metadata destination = new Metadata("D:\\destination.pdf");
PdfRootPackage source_root = source.getRootPackageGeneric();
PdfRootPackage destination_root = destination.getRootPackageGeneric();
System.out.println("\nBefore copy:");
System.out.println("\nSource package:");
System.out.println(source_root.getDocumentProperties().getAuthor());
System.out.println(source_root.getDocumentProperties().getCreatedDate());
System.out.println(source_root.getDocumentProperties().getProducer());
System.out.println("\nDestination package:");
System.out.println(destination_root.getDocumentProperties().getAuthor());
System.out.println(destination_root.getDocumentProperties().getCreatedDate());
System.out.println(destination_root.getDocumentProperties().getProducer());
source_root.copyTo(destination_root);
System.out.println("\n\nAfter copy:");
System.out.println("\nDestination package:");
System.out.println(destination_root.getDocumentProperties().getAuthor());
System.out.println(destination_root.getDocumentProperties().getCreatedDate());
System.out.println(destination_root.getDocumentProperties().getProducer());
Copy metadata properties from source file to destination file by tag
Metadata source = new Metadata("D:\\source.pdf");
Metadata destination = new Metadata("D:\\destination.pdf");
java.util.List<PropertyTag> list = new ArrayList<PropertyTag>();
list.add(Tags.getPerson().getCreator());
int count = source.copyTo(destination.getRootPackage(), list);
System.out.println(count);
Use FileType.fromExtension method
System.out.println(com.groupdocs.metadata.core.FileType.fromExtension(".dwg"))