AsposeFontAbout
AsposeFontAbout function
Get info about Product.
function AsposeFontAbout()
Return value
JSON object
Field | Description |
---|---|
errorCode | code error (0 no error) |
errorText | text error ("" no error) |
product | Product name |
version | Product version |
islicensed | Product is licensed |
Web Worker example:
/*Create Web Worker*/
const AsposeFontWebWorker = new Worker("AsposeFontforJS.js");
AsposeFontWebWorker.onerror = evt => console.log(`Error from Web Worker: ${evt.message}`);
AsposeFontWebWorker.onmessage = evt => document.getElementById('output').textContent =
(evt.data == 'ready') ? 'loaded!' :
(evt.data.json.errorCode !== 0) ? `Error: ${evt.data.json.errorText}` :
"Product : " + evt.data.json.product
+ "\nVersion : " + evt.data.json.version
+ "\nIs licensed : " + evt.data.json.islicensed;
/*Event handler*/
const onAsposeFontAbout = e => {
/*Get info about Product - Ask Web Worker*/
AsposeFontWebWorker.postMessage({ "operation": 'AsposeFontAbout', "params": [] }, []);
};
Simple example:
var onAsposeFontAbout = function () {
/*Get info about Product*/
const json = AsposeFontAbout();
if (json.errorCode == 0) document.getElementById('output').textContent = "Product : " + json.product
+ "\nVersion : " + json.version
+ "\nIs licensed : " + json.islicensed;
else document.getElementById('output').textContent = json.errorText;
}