Sets the GroupDocs.Redaction license from a file path.
The method can also accept an open binary stream containing the license data.
defset_license(self,license_path):...
Parameter
Type
Description
license_path
str
License file path.
Example
importosfromgroupdocs.redactionimportLicensedefset_license_from_file():# Resolve the license path from the environment, with a local fallbacklicense_path=os.environ.get("GROUPDOCS_LIC_PATH","./GroupDocs.Redaction.lic")# Apply the license before using any redaction featuresifos.path.exists(license_path):License().set_license(license_path)print("License set successfully.")else:print("License file not found. Running in evaluation mode.")
set_license
Sets the GroupDocs.Redaction license from a stream.
defset_license(self,license_stream):...
Parameter
Type
Description
license_stream
io.RawIOBase
License stream.
Example
importosfromgroupdocs.redactionimportLicenselicense_path=os.environ.get("GROUPDOCS_LIC_PATH","./GroupDocs.Redaction.lic")ifos.path.exists(license_path):withopen(license_path,"rb")asstream:License().set_license(stream)print("License set successfully.")else:print("License file not found. Running in evaluation mode.")
Aliases
These names call set_license too, limited to the overloads listed.