Sometimes, to study the system better, you want to dive into the code as fast as possible. To make this easier, GroupDocs.Markdown offers a Free Trial and a 30-day Temporary License for evaluation and provides different purchase plans.
Note
Note that there are a number of general policies and practices that guide you on how to evaluate, properly license, and purchase our products. You can find them in the “Purchase Policies and FAQ” section.
Free Trial or Temporary License
You can try GroupDocs.Markdown without buying a license.
Free Trial
The evaluation version is the same as the purchased one – the evaluation version simply becomes licensed when you set the license. You can set the license in a number of ways that are described in the next sections of this article.
The evaluation version comes with the following limitations:
Only the first 3 pages are processed.
Documents with more than 3 pages are not supported.
An evaluation watermark is placed at the top of each page.
Temporary License
If you wish to test GroupDocs.Markdown without the limitations of the trial version, you can also request a 30-day Temporary License. For more details, see the “Get a Temporary License” page.
After obtaining a license, you need to set it up. This section describes options for how this can be done and also comments on some common questions.
The license should be set:
Only once per application domain.
Before using any other GroupDocs.Markdown classes.
Note
The license can be set multiple times per app domain but we recommend doing it once since all calls after the first one will just waste processor time.
Set License from File (Static Method)
The License.set_() static method is the simplest way to apply a license. You do not need to create a License instance.
importosfromgroupdocs.markdownimportLicensedefset_license_static():"""Apply a license from a file using the static convenience method."""# Step 1: Set the license using the static method (call once per app)license_path="GroupDocs.Markdown.lic"ifos.path.exists(license_path):License.set_(license_path)if__name__=="__main__":set_license_static()
Set License from File (Instance Method)
Alternatively, you can create a License instance and call set_license():
importosfromgroupdocs.markdownimportLicensedefset_license_instance():"""Apply a license from a file using the instance method."""# Step 1: Define the path to the license filelicense_path="GroupDocs.Markdown.lic"# Step 2: Create a License instance and apply the licenseifos.path.exists(license_path):license=License()license.set_license(license_path)if__name__=="__main__":set_license_instance()
Set License from Stream (Static Method)
You can also apply a license from a stream using the static License.set_() method:
importosfromgroupdocs.markdownimportLicensedefset_license_stream_static():"""Apply a license from a stream using the static convenience method."""# Step 1: Open the license file as a binary streamlicense_path="GroupDocs.Markdown.lic"ifos.path.exists(license_path):withopen(license_path,"rb")asstream:# Step 2: Apply the license from the streamLicense.set_(stream)if__name__=="__main__":set_license_stream_static()
Set License from Stream (Instance Method)
The following example shows how to set a license from a stream using the instance method:
importosfromgroupdocs.markdownimportLicensedefset_license_stream_instance():"""Apply a license from a stream using the instance method."""# Step 1: Open the license file as a binary streamlicense_path="GroupDocs.Markdown.lic"ifos.path.exists(license_path):withopen(license_path,"rb")asstream:# Step 2: Create a License instance and apply from the streamlicense=License()license.set_license(stream)if__name__=="__main__":set_license_stream_instance()
Set License from Environment Variable
You can auto-apply a license at import time by setting the GROUPDOCS_LIC_PATH environment variable. The license is applied automatically when the package is imported — no code changes needed:
You can also set a Metered license as an alternative to a license file. It is a usage-based licensing mechanism that is billed based on the API features consumed. For more details, please refer to the Metered Licensing FAQ section.
Use the Metered class to set up metered licensing and query your consumption:
fromgroupdocs.markdownimportMetereddefset_metered_license():"""Set up metered (usage-based) licensing and query consumption."""# Step 1: Provide your metered license keyspublic_key=""# your public license keyprivate_key=""# your private license key# Step 2: Create a Metered instance and activate the keys (skip if keys not set)ifpublic_keyandprivate_key:metered=Metered()metered.set_metered_key(public_key,private_key)# Step 3: Query amount (MB) consumedamount_consumed=Metered.get_consumption_quantity()print("Amount (MB) consumed: "+str(amount_consumed))# Step 4: Query count of credits consumedcredits_consumed=Metered.get_consumption_credit()print("Credits consumed: "+str(credits_consumed))if__name__=="__main__":set_metered_license()
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.