Documents > Cuminas License System |
The License System is a software license management system which is built into this library. This system limits several features of SDKs from abuses. For example, both of PixelLive and Secure DjVu has their own DRM (Digital Rights Management) system and its very important to verify every viewer correctly implements the DRM limitations (such as viewing, printing and exporting) thus we want to license the features only to the applications which are verified to confirm the DRM limitations.
The other reason is to protect against abuse of our software. We greatly appreciate your understanding of our SDK licensing policy.
LicenseManager is the main interface to access the license system. As you may already know, every sample contains the line of LicenseScript Property. You have to do this before calling the SDK features.
The following is a sample code to set a license script.
License script initialization |
Copy Code |
---|---|
// THIS IS JUST A SAMPLE: The actual script below depends on your license condition. LicenseManager.LicenseScript = "AAAAScHVN5lUS/PRghSK03O1qNRaRc3ENz4Q47B3ndCHBcZAgXjROmcUaHNtWDKoTW/zaDnO+Mj1Kjd3HO4UreatXsnWTDVfIv1IlL65tHlM"; |
The license script is a script which describes how the application activates the SDK features. The license script is issued by Cuminas according to the actual license agreement between Cuminas and your organization.
If you are evaluating the SDK, you're already has developer license; you can build/test/demonstrate your binary (executable code) and the binary runs two weeks from the build date. If your binary expires, you can still rebuild the binary to continue your work (the rebuilt binary also runs two weeks from its build date.)
Product ID is a 128-bit identifier which uniquely identifies a product.
On DjVu#, ProductStatus.ProductId Property provides the information.
Product Description is human-readable string which briefly describes the product.
On DjVu#, ProductStatus.ProductDescription Property provides the information.
A feature is a function provided by the SDK and Feature Enumeration is used to describe them.
DjVu# currently uses the following features:
# | ID | Feature Description |
---|---|---|
5 | DjVuDecode | DjVu file decoding |
6 | DjVuEncode | DjVu file encoding |
7 | SecureDjVuDecode | Secure DjVu file decoding |
8 | SecureDjVuEncode | Secure DjVu file encoding |
9 | PerformOCR | OCR feature |
10 | PdfEncode | High Compression PDF encoding |
11 | LeadToolsExtension | LEADTOOLS support for advanced file formats |
Feature Activation Schemata defines the usage of features. Each feature can be activated by one of the following schemata defined by ActivationScheme Enumeration:
On DjVu#, ProductStatus.FeatureStatus Property provides access to activation schemata.
By default, the library is initialized with a license script which enables development license for all features. So every feature can be used in 2 weeks after build. This license script is only for the development purpose and you must obtain a license script for your product when you release the product.
Cartridge system manages all the cartridges installed on a machine and it uses a centerized database. The database is initialized when some of the application firstly access to it and it does not need any manual action for installation, configuration.
CartridgeManager is only the interface to access the cartridge system.
Cartridge system manages all the products installed and activated on the machine. You can get the product IDs of these products by ActivatedProducts Property.
Enumerating all the product IDs of the installed products |
Copy Code |
---|---|
foreach (string prodId in CartridgeManager.ActivatedProducts) Console.WriteLine(prodId); |
If you have a product ID, you can easily get the product status including how many cartridges currently installed on the machine. ProductStatus Class is used to describe the status and the status is obtained by GetProductStatus Method.
Querying Document Express Enterprise's product status |
Copy Code |
---|---|
// Document Express Enterprise's Product ID string prodId = "309707dd4ae522ecdb8f36d7e0c44d5d8518ea48"; ProductStatus ps = CartridgeManager.GetProductStatus(prodId); Console.WriteLine("Product ID: {0}", ps.ProductId); Console.WriteLine("Description: {0}", ps.ProductDescription); |
ProductStatus.FeatureStatus Property is the array of FeatureInfo Class. Each entry describes activation scheme, remaining cartridges and expiry for the evaluation/subscription cartridge.
A feature cartridge is consumed when the user uses the feature and the remaining cartridges actually means how many times the user can use the feature. Count Property of FeatureInfo Class is the number of the cartridge. There is also a special cartridge status; unlimited. If IsUnlimited is true, the cartridge is never consumed but it allows the user to use the feature unlimitedly.
Evaluation/Subscription cartridges are the cartridges with expiry. The cartridges cannot be used after the expiry date-time. There's no actual difference between evaluation cartridges and subscription cartridges. But normally subscription cartridges can extend the expiry but evaluation ones can not.
AltCount Property is the number of evaluation/subscription cartridges installed for a feature and the expiry member is the expiry. The evaluation/subscription cartridge also have the unlimited status and if IsAltUnlimited is true, the evaluation/subscription cartridge is never consumed but it allows the user to use the feature unlimitedly until the expiry.
Cuminas Cartridge Viewer is a GUI tool to check, install and order cartridges. User can check the cartridge status of each product installed on the machine.
There is "Order Information" button under cartridge status listbox and when the user click the button, text editor is opened with the text like the following:
Since this machine currently cannot connect to the online order site, you had better order the cartridge by e-mail. The following information is needed to order your cartridge and you had better copy-n-paste the following information to your order e-mail:
eJzNyjEOwjAMQNFykx7BcRw7ZqY7V8CJLTFAUVskpp6dDTEyorf84Q!D4YxJKUNQ5U4RTM1Ya9OWq0AyV!V6YQ7bw-BSQrh7psBs0bsXqJ4aSiuVk5F2tbyf5va8-X0bp9dj8XUdp37d5mXkHT7wSKikLKjlOxMKgtQs9FcL!O4NBKFZNQ==
The scrambled script contains the following information:
The user will send the information to Cuminas and Cuminas issues a new cartridge script (of the required quantity) according to the script.
And, when the user obtains a new cartridge script from Cuminas, the user can install the cartridge by [File - Install Cartridge].
You can also create your own code to request/install new cartridges. The cartridge request script can be generated by CartridgeManager.GetCartridgeRequestScript Method:
Generating Cartridge Request |
Copy Code |
---|---|
string script = CartridgeManager.GetCartridgeRequestScript(); |
And, for installation, you can use CartridgeManager.InstallCartridge Method:
Installing a Cartridge |
Copy Code |
---|---|
CartridgeManager.InstallCartridge("..."); |
If you want to use DjVu# from the scripting environment like Widows Scripting Host or Windows Power Shell environment, You can not use developer license due to technical issues.
You can workaround this by using page cartridges. To use page cartridges, you firstly modify your code to use cartridges. Please add the following code (or code equivalent to this) to somewhere before the actual DjVu decoding/encoding code:
Non Developer License Initialization |
Copy Code |
---|---|
DjVu.LicenseManager.LicenseScript = "AAAAYYQRfDlqUk1E828qBXTKGBDPGfIcaGovTeiJJEM+Yiq/eGGWd/6U+yYMUW9F2FC1oHZfiKTh7pO2xm4kOs/sQXRxL7xe2MZvr58anqkVkD9w8bHEDXSfrAUC8vM+kDJZKsjleqeT"; |
Then, your code is able to consume cartridges. You have to install cartridges.
Use the following string to activate DjVu# in the scripting environment. You can encode up to 1000 pages. The decoding function is unlimited. If you need more cartridge, please contact us at sales@cuminas.jp.
AAAAVeP2jvEBLrKWrh8yzFX+IR3LVvZ8PLPlahIu+s8Y3KAEF4QBGRzoeO7GYQjmbxed3SoJ7oweERVLRZxvQesn4giygGgpHQsTKMm2oj7iWdzMXOVfdezqSDwt