To study the API quickly, GroupDocs.Metadata offers a Free Trial and a 30-day Temporary License for evaluation, along with several purchase plans.
Note
GroupDocs.Metadata also works without a license in trial mode, with certain limitations.
Purchased License
After buying, apply the license file or include it as an embedded resource. The license needs to be set:
Only once per application
Before using any other GroupDocs.Metadata classes
Evaluation version limitations
The evaluation download is identical to the purchased one — it simply becomes licensed when you apply a license. Without a license you will face the following limitations:
API
Limitation
Document properties (PDF, Word, Excel, PowerPoint, Visio, etc.)
Only the first 5 properties can be read
XMP API
Only the first 2 XMP schemes can be read
EXIF API
GPS IFD and image thumbnail are unavailable; only the first 5 properties can be read
IPTC API
Only the first 5 properties can be read
ID3v2, Lyrics3, APEv2 tags
Only the first 5 properties can be read
QuickTime atoms
Only the first 5 atoms can be read
File open
A maximum of 15 files can be opened, otherwise the API throws an exception
File save
Not supported in trial mode — save() raises an “Evaluation only” exception
Licensing
The license file contains details such as the product name, the number of developers it is licensed to, and the subscription expiry date. It carries a digital signature, so don’t modify the file — even an inadvertent extra line break will invalidate it. Set a license before using the API to avoid the evaluation limitations.
The license can be loaded from a file or from a stream.
Applying license from a file
importosfromgroupdocs.metadataimportLicensedefset_license_from_file():# Resolve the license path relative to the current working directorylicense_path=os.path.abspath("./GroupDocs.Metadata.lic")ifos.path.exists(license_path):# Apply the license once, before using any other Metadata APIlicense=License()license.set_license(license_path)print("License set successfully.")else:print("License file not found; running in evaluation mode.")if__name__=="__main__":set_license_from_file()
Applying license from a stream
importosfromgroupdocs.metadataimportLicensedefset_license_from_stream():license_path=os.path.abspath("./GroupDocs.Metadata.lic")ifos.path.exists(license_path):# set_license also accepts a readable binary streamwithopen(license_path,"rb")asstream:License().set_license(stream)print("License set successfully.")else:print("License file not found; running in evaluation mode.")if__name__=="__main__":set_license_from_stream()
Applying a Metered License
Note
You can also set a Metered license as an alternative to a license file. It is a licensing mechanism that bills based on usage. For more details, please refer to the Metered Licensing FAQ.
The simple steps to use the Metered class:
Create an instance of the Metered class.
Pass the public and private keys to the set_metered_key method.
Perform your processing.
Call Metered.get_consumption_quantity() to get the amount of API requests consumed so far.
Call Metered.get_consumption_credit() to get the credit consumed so far.
fromgroupdocs.metadataimportMetereddefset_metered_license():public_key="*****"# Your public keyprivate_key="*****"# Your private key# Guard the sample so it doesn't call the API with placeholder keysif"*"inpublic_keyor"*"inprivate_key:print("Provide your real metered keys to activate metered licensing.")return# Activate metered (pay-as-you-go) billing for this processMetered().set_metered_key(public_key,private_key)print("Metered license set successfully.")if__name__=="__main__":set_metered_license()
Note
Calling License.set_license multiple times is not harmful but simply wastes processor time. Call it once when the application starts.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.