MeadCo.ScriptX.Print
MeadCo.ScriptX.Print
A static class wrapping calls to the server API.
- Description:
MeadCo.ScriptX.Print
A static class wrapping calls to the server API.
Requires: meadco-core.js
Includes processing of calls to the print api that return "printing to file" including collecting the file output.
Provides attribute based connection to the server.
Synchronous AJAX calls are deprecated in all browsers but may be useful to "quick start" use of older code. It is recommended that code is moved to using asynchronous calls as soon as practical. The MeadCoScriptXJS library can assist with this as it delivers promise rather than callback based code.
AJAX calls can be made via jQuery or browser native fetch(). If jQuery is available it will be used by preference - if used jQuery v1.19 or later is required.
jQuery is required for synchronous AJAX calls.
To use fetch, even if jQuery is available then set MeadCo.fetchEnabled to false.
This can be done using an attribute: data-meadco-usefetch="true" or declare var MeadCo = { useFetch: true } before including this library This is useful if a very old version of jQuery is required for UI.
- Source:
Members
(static, readonly) activeJobs
The number of jobs there are active at the server for this client
.- Description:
The number of jobs there are active at the server for this client
- Source:
Properties:
Name | Type | Description |
---|---|---|
activeJobs |
int | the number of jobs |
The number of jobs there are active at the server for this client
(static) authorisationCookie
Get/set the cookie to be used to authorise access to protected content
.- Description:
Get/set the cookie to be used to authorise access to protected content
- Source:
Properties:
Name | Type | Description |
---|---|---|
authorisationCookie |
string | the cookie in the form name=value |
Get/set the cookie to be used to authorise access to protected content
(static, readonly) availablePrinterNames
Get the list of printers availablefrom the server.
- Description:
Get the list of printers availablefrom the server.
- Source:
Properties:
Name | Type | Description |
---|---|---|
availablePrinterNames |
Array.<string> | an array of strings of the names of the available printers |
Get the list of printers availablefrom the server.
(static, readonly) clientSideJobs
The number of client only jobs (locks and those waiting for delivery to the server) active at this client
.- Description:
The number of client only jobs (locks and those waiting for delivery to the server) active at this client
- Source:
Properties:
Name | Type | Description |
---|---|---|
clientSideJobs |
int | the number of jobs |
The number of client only jobs (locks and those waiting for delivery to the server) active at this client
(static) deviceSettings
Get/set the cached device settings (papersize etc) for the currently active printer
.- Description:
Get/set the cached device settings (papersize etc) for the currently active printer
- Source:
Properties:
Name | Type | Description |
---|---|---|
deviceSettings |
DeviceSettingsObject | (see API /api/vi/printhtml/deviceInfo/ ) |
Get/set the cached device settings (papersize etc) for the currently active printer
(static, readonly) isConnected
true if the library has succesfully connected to a server and the default device settings obtained.
- Description:
true if the library has succesfully connected to a server and the default device settings obtained.
- Source:
Properties:
Name | Type | Description |
---|---|---|
isConnected |
bool | true if the library has succesfully connected to a server. |
true if the library has succesfully connected to a server and the default device settings obtained.
(static, readonly) isSpooling
Get if print is still 'spooling', in other words still queued at the server
.- Description:
Get if print is still 'spooling', in other words still queued at the server
- Source:
Properties:
Name | Type | Description |
---|---|---|
isSpooling |
bool |
Get if print is still 'spooling', in other words still queued at the server
(static) jobFileName
Get/set the name to use on the next job
.- Description:
Get/set the name to use on the next job
- Source:
Properties:
Name | Type | Description |
---|---|---|
jobFileName |
string |
Get/set the name to use on the next job
(static, readonly) noJobsWaitingDelivery
Check if there are no jobs waiting for delivery to the server (faster than clientSideJobs==0)
.- Description:
Check if there are no jobs waiting for delivery to the server (faster than clientSideJobs==0)
- Source:
Properties:
Name | Type | Description |
---|---|---|
noJobsWaitingDelivery |
bool | true if no jobs waiting |
Check if there are no jobs waiting for delivery to the server (faster than clientSideJobs==0)
(static) onErrorAction
Get/set the action to take when an error occurs
.- Description:
Get/set the action to take when an error occurs
- Source:
Properties:
Name | Type | Description |
---|---|---|
onErrorAction |
ErrorAction | the action |
Get/set the action to take when an error occurs
(static) printerName
Get/set the currently active printer
.- Description:
Get/set the currently active printer
- Source:
Properties:
Name | Type | Description |
---|---|---|
printerName |
string | The name of the current printer in use. |
Get/set the currently active printer
(static, readonly) queue
The list of jobs currently active at this client or server (client 'jobs' are those waiting to be delivered to the server and 'locks' while asychronous UI is in progress).
- Description:
The list of jobs currently active at this client or server (client 'jobs' are those waiting to be delivered to the server and 'locks' while asychronous UI is in progress).
- Source:
Properties:
Name | Type | Description |
---|---|---|
queue |
Array.<object> | array of jobs |
The list of jobs currently active at this client or server (client 'jobs' are those waiting to be delivered to the server and 'locks' while asychronous UI is in progress).
(static) queueGapResetTime
Get/set the time since last print call after which the job spacing timeout is reset
.- Description:
Get/set the time since last print call after which the job spacing timeout is reset
- Source:
Properties:
Name | Type | Description |
---|---|---|
queueGapResetTime |
number |
Get/set the time since last print call after which the job spacing timeout is reset
(static) queueTimeoutSpacing
Get/set the timeout between jobs when there is a series of print calls and maintaining the output order is required.
- Description:
Get/set the timeout between jobs when there is a series of print calls and maintaining the output order is required. The default is 750ms. On slow systems/slow connections this may need to be increased.
- Source:
Properties:
Name | Type | Description |
---|---|---|
queueTimeoutSpacing |
number |
Get/set the timeout between jobs when there is a series of print calls and maintaining the output order is required. The default is 750ms. On slow systems/slow connections this may need to be increased.
(static) serviceUrl
Get the full url of the ScriptX.Services server connected to
.- Description:
Get the full url of the ScriptX.Services server connected to
- Source:
Properties:
Name | Type | Description |
---|---|---|
serviceUrl |
string |
Get the full url of the ScriptX.Services server connected to
(static) version
Get the version of this module as a string major.minor.hotfix.build
.- Description:
Get the version of this module as a string major.minor.hotfix.build
- Source:
Properties:
Name | Type | Description |
---|---|---|
version |
string |
Get the version of this module as a string major.minor.hotfix.build
Methods
(static) addPrinterConnection(sShareName)
Add a printer for the user.
- Description:
Add a printer for the user. The printer driver must already be available.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
sShareName |
any |
(static) addPrinterConnectionAsync(sShareName, onSuccess, onFail)
Add a printer for the user.
- Description:
Add a printer for the user. The printer driver must already be available.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
sShareName |
any | |
onSuccess |
any | |
onFail |
any |
(static) connect(serverUrl, licenseGuid)
Specify the server to use and the subscription/license id.
- Description:
Specify the server to use and the subscription/license id.
Attempt to connect to the defined ScriptX.Services server and obtain the device settings for the default printer. This call is synchronous and therefore not recommended. Use connectAsync()
- Source:
Parameters:
Name | Type | Description |
---|---|---|
serverUrl |
string | the 'root' url to the server (the api path will be added by the library) |
licenseGuid |
string | the license/subscription identifier |
(static) connectAsync(serverUrl, licenseGuid, resolve, reject)
Specify the server to use and the subscription/license id.
- Description:
Specify the server to use and the subscription/license id.
Attempt to connect to the defined ScriptX.Services server and obtain the device settings for the default printer.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
serverUrl |
string | the 'root' url to the server (the api path will be added by the library) |
licenseGuid |
string | the license/subscription identifier |
resolve |
function | function to call on success, dataObject contains the device settings for the default device. |
reject |
function | function to call on failure |
(static) connectDeviceAndPrinters(deviceInfo, arPrinters)
Cache the given device info and available printers in this static class instance
Used by libraries that call api/v1/printHtml/htmlPrintDefaults
.- Description:
Cache the given device info and available printers in this static class instance
Used by libraries that call api/v1/printHtml/htmlPrintDefaults
- Source:
Parameters:
Name | Type | Description |
---|---|---|
deviceInfo |
object | the device name and settings (papersize etc) |
arPrinters |
array | the names of the available printers |
(static) connectLite(serverUrl, licenseGuid)
Specify the server and the subscription/license id to use on AJAX calls.
- Description:
Specify the server and the subscription/license id to use on AJAX calls. No call is made in this function
- Source:
Parameters:
Name | Type | Description |
---|---|---|
serverUrl |
string | the 'root' url to the server (the api path will be added by the library) |
licenseGuid |
string | the license/subscription identifier |
(static) connectTestAsync(serverUrl, resolve, reject)
Test if there is a MeadCo PrintHtml API server at the url
.- Description:
Test if there is a MeadCo PrintHtml API server at the url
- Source:
Parameters:
Name | Type | Description |
---|---|---|
serverUrl |
string | the 'root' url to the server (the api path will be added by the library) |
resolve |
function | function to call on success |
reject |
function | function to call on failure |
(static) deviceSettingsFor(sPrinterName) → {DeviceSettingsObject}
Get the device settings (papersize etc) for the named printer.
- Description:
Get the device settings (papersize etc) for the named printer. This call is synchronous and not recommended.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
sPrinterName |
string | the name of the printer device to return the settings for |
Returns:
object with properties
- Type
- DeviceSettingsObject
(static) deviceSettingsForAsync(sPrinterName, resolve, reject)
Get the device settings (papersize etc) for the named printer.
- Description:
Get the device settings (papersize etc) for the named printer. If not already downloaded this function is asynchronous.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
sPrinterName |
string | the name of the printer device to return the settings for |
resolve |
function | function to call on success |
reject |
function | function to call on failure |
(static) ensureSpoolingStatus() → {object}
Make sure that spooling status is locked active while asynchronous UI that may start printing is displayed by placing a lock on the queue.
- Description:
Make sure that spooling status is locked active while asynchronous UI that may start printing is displayed by placing a lock on the queue.
- Source:
Example
var lock = MeadCo.ScriptX.Print.ensureSpoolingStatus
ShowAsyncUI(function() {
MeadCo.ScriptX.Print.freeSpoolStatus(lock);
});
Returns:
a fake job to lock the spooling status on
- Type
- object
(static) freeSpoolStatus(lock)
Remove a lock on the queue that was created by a call to ensureSpoolingStatus().
- Description:
Remove a lock on the queue that was created by a call to ensureSpoolingStatus().
- Source:
Parameters:
Name | Type | Description |
---|---|---|
lock |
object | the lock object returned by ensureSpoolingStatus() |
(static) getFromServer(sPrintHtmlApi, async, onSuccess, onFail)
Call a /printHtml API on the server with GET
.- Description:
Call a /printHtml API on the server with GET
- Source:
Parameters:
Name | Type | Description |
---|---|---|
sPrintHtmlApi |
string | the api to call on the connected server |
async |
bool | true for asynchronous call, false for synchronous |
onSuccess |
function | function to call on success |
onFail |
function | function to call on failure |
(static) parseAjaxError(logText, jqXhr, textStatus, errorThrown) → {string}
Extract the error text from jQuery AJAX response
.- Description:
Extract the error text from jQuery AJAX response
- Source:
Parameters:
Name | Type | Description |
---|---|---|
logText |
string | The lead-in text for a console.log entry |
jqXhr |
object | jQuery ajax header |
textStatus |
string | textStatus result determined by jQuery |
errorThrown |
string | The server exception dewtermined by jQuery |
Returns:
The error text to display
- Type
- string
(static) parseFetchError(errorThrown) → {string}
Extract the error text from browser fetch response
.- Description:
Extract the error text from browser fetch response
- Source:
Parameters:
Name | Type | Description |
---|---|---|
errorThrown |
object | error caught from fetch |
Returns:
The error text to display
- Type
- string
(static) printDirect(contentType, content, fnDone) → {boolean}
Post a request to the server to print a string directly to the current printer.
- Description:
Post a request to the server to print a string directly to the current printer. The print is synchronous at the server and is completed (sent to the printer) when the api returns.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
contentType |
ContentType | enum type of content given (string or url) |
content |
string | the content - a url, or string containing e.g. zpl. |
fnDone |
function | function to call when printing complete, arg is null on no error, else error message |
Returns:
- true if a print was started (otherwise an error will be thrown) *
- Type
- boolean
(static) printHtml(contentType, content, htmlPrintSettings, fnDone, fnProgress, data) → {boolean}
Post a request to the server to print some html and monitor the print job to completion.
- Description:
Post a request to the server to print some html and monitor the print job to completion. If the server prints to file then the file is opened for the user (in a new window)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
contentType |
ContentType | enum type of content given (html snippet, url) |
content |
string | the content - a url, html snippet or complete html |
htmlPrintSettings |
object | the html settings to use such as headers and footers, device settings (printer to use, copies etc) are taken from this static |
fnDone |
function | function to call when printing complete (and output returned), arg is null on no error, else error message. |
fnProgress |
function | function to call when job status is updated |
data |
any | object to give pass to fnProgress |
Returns:
- true if a print was started (otherwise an error will be thrown)
- Type
- boolean
(static) printPdf(document, pdfPrintSettings, fnDone, fnProgress, data) → {boolean}
Post a request to the server to print some html and monitor the print job to completion.
- Description:
Post a request to the server to print some html and monitor the print job to completion. If the server prints to file then the file is opened for the user (in a new window)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
document |
string | full url to the pdf document to be printed |
pdfPrintSettings |
object | the settings to use such as rotation, scaling. device settings (printer to use, copies etc) are taken from this static |
fnDone |
function | function to call when printing complete (and output returned), arg is null on no error, else error message. |
fnProgress |
function | function to call when job status is updated |
data |
any | object to give pass to fnProgress |
Returns:
- true if a print was started (otherwise an error will be thrown)
- Type
- boolean
(static) removePrinterConnection(sShareName)
Add a printer for the user.
- Description:
Add a printer for the user. The printer driver must already be available.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
sShareName |
any |
(static) removePrinterConnectionAsync(sShareName, onSuccess, onFail)
Add a printer for the user.
- Description:
Add a printer for the user. The printer driver must already be available.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
sShareName |
any | |
onSuccess |
any | |
onFail |
any |
(static) reportError(errorTxt)
'derived' classes call this function to report errors, will either throw or report depending on value of onErrorAction.
- Description:
'derived' classes call this function to report errors, will either throw or report depending on value of onErrorAction.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
errorTxt |
string | the error text to display |
(static) reportFeatureNotImplemented(featureDescription)
overridable function for reporting an implementation isnt available.
- Description:
overridable function for reporting an implementation isnt available. 'derived' classes call this function to report functions that are not yet implemented.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
featureDescription |
string | descriptn of the feature that isnt available
|
(static) reportServerError(errorTxt)
overridable function for reporting an error.
- Description:
overridable function for reporting an error. 'derived' classes call this function to report errors.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
errorTxt |
string | the error text to display
|
(static) requestHtmlPreview(contentType, content, htmlPrintSettings, fnDone, fnReady)
Post a request to the server to generate a preview.
- Description:
Post a request to the server to generate a preview. When ready the url from which the preview can be downloaded is passed to the fnReady function.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
contentType |
ContentType | enum type of content given (html snippet, url) |
content |
string | the content - a url, html snippet or complete html |
htmlPrintSettings |
object | the html settings to use such as headers and footers, device settings (printer to use, copies etc) are taken from this static |
fnDone |
function | function to call when processing is complete arg is null on no error, else error message. |
fnReady |
function | function to call when the preview is available to download |
(static) serviceDescription() → {ServiceDescriptionObject}
Obtain the description of the service provided by the server
.- Description:
Obtain the description of the service provided by the server
- Source:
Returns:
serviceDescription
- Type
- ServiceDescriptionObject
(static) serviceDescriptionAsync(resolve, reject)
Obtain the description of the service provided by the server
.- Description:
Obtain the description of the service provided by the server
- Source:
Parameters:
Name | Type | Description |
---|---|---|
resolve |
function | function to call on success |
reject |
function | function to call on failure |
(static) serviceVersion() → {VersionObject}
Get the version of the service connected to.
- Description:
Get the version of the service connected to.
- Source:
Returns:
the version
- Type
- VersionObject
(static) serviceVersionAsync(resolve, reject)
Get the version of the service connected to.
- Description:
Get the version of the service connected to.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
resolve |
function | function to call on success |
reject |
function | function to call on failure |
(static) useAttributes()
search for processing attibutes for connection and subscription/license and process them.
- Description:
search for processing attibutes for connection and subscription/license and process them. The attibutes can be on any element. This function is called automatically by factory emulation and licensing emulation scripts so does not usually need to be called by document script.
Please note synchronous AJAX calls are deprecated in all browsers but may be useful to "quick start" use of older code. It is recommended that code is moved to using asynchronous calls as soon as practical. The MeadCoScriptXJS library can assist with this as it delivers promise rather than callback based code.
- Source:
Example
<!-- an example connection to an On Premise server for ScriptX.Services -->
<script src="lib/meadco-scriptxservicesprintUI.min.js"
data-meadco-server="https://app.corpservices/"
data-meadco-subscription="" data-meadco-syncinit="false">
</script>;
<!-- an example connection to ScriptX.Services for Windows PC -->
<script src="lib/meadco-scriptxservicesUI.min.js"
data-meadco-server="http://127.0.0.1:41191"
data-meadco-license="{6BC6808B-D645-40B6-AE80-E9D0825797EF}"
data-meadco-syncinit="false"
data-meadco-license-path="warehouse"
data-meadco-license-revision="3">
</script>
data-meadco-server value is the root url, api/v1/printhtml, api/v1/licensing will be added by the library
data-meadco-syncinit default is true for synchronous calls to the server, value 'false' to use asynchronous calls to the server
data-meadco-subscription present => cloud/on premise service, value is the subscription GUID
data-meadco-license present => for Windows PC service, value is the license GUID
If data-meadco-license is present then the following additional attributes can be used:
data-meadco-license-revision, value is the revision number of the license
data-meadco-license-path, value is the path to the license file (sxlic.mlf). A value of "warehouse" will cause the license to be downloaded from MeadCo's License Warehouse
data-meadco-reporterror, default is "true", value "false" suppresses error messages during the initial connection to the service (only)
(static) waitForDeliveryComplete(iTimeout, fnComplete)
Start (asynchronous) monitor to observe until all submitted jobs have been delivered to the server, there will probably be jobs still waiting to process/spool at the server.
- Description:
Start (asynchronous) monitor to observe until all submitted jobs have been delivered to the server, there will probably be jobs still waiting to process/spool at the server. It is not safe to close the browser window until this function indicates completion
- Source:
Parameters:
Name | Type | Description |
---|---|---|
iTimeout |
int | wait until complete or timeout (in ms) -1 => infinite |
fnComplete |
function | callback function, arg is true if all jobs delivered |
(static) waitForDeliveryCompleteAsync() → {Promise}
Waits for all pending operations originated with Print, PrintHTML and BatchPrintPDF to be delivered to the server.
- Description:
Waits for all pending operations originated with Print, PrintHTML and BatchPrintPDF to be delivered to the server. This is useful to determine when it is safe to call window.close() and not loose jobs and is a significantly shorter period than waitForSpoolingComplete()
- Source:
Example
MeadCo.ScriptX.PrintPage(false);
await MeadCo.ScriptX.Print.waitForDeliveryCompleteAsync();
self.close();
Returns:
Promise object represents boolean with value true if all jobs have been delivered.
- Type
- Promise
(static) waitForSpoolingComplete(iTimeout, fnComplete)
Start (asynchronous) monitor to observe until no more jobs spooling/waiting at the server then call the given callback function
.- Description:
Start (asynchronous) monitor to observe until no more jobs spooling/waiting at the server then call the given callback function
- Source:
Parameters:
Name | Type | Description |
---|---|---|
iTimeout |
int | wait until complete or timeout (in ms) -1 => infinite |
fnComplete |
function | callback function, arg is true if all jobs complete |
(static) waitableServiceDescription()
Obtain the description of the service provided by the server
.- Description:
Obtain the description of the service provided by the server
- Source:
Returns:
a Promise that resolves to the service description object
Type Definitions
AccessControl
Provide authorisation details to access protected content.
- Description:
Provide authorisation details to access protected content.
- Source:
Properties:
Name | Type | Description |
---|---|---|
cookie |
string | The authorisation cookie in the form name=value|name2=value2 |
Provide authorisation details to access protected content.
CollateOptions
Enum to describe the collation option when printing
.- Description:
Enum to describe the collation option when printing
- Source:
Properties:
Name | Type | Description |
---|---|---|
DEFAULT |
number | 0 use the default at the print server |
TRUE |
number | 1 collate pages when printing |
FALSE |
number | 2 do not collate pages |
Enum to describe the collation option when printing
Type:
- number
ContentType
Enum for type of content being posted to printHtml API
.- Description:
Enum for type of content being posted to printHtml API
- Source:
Properties:
Name | Type | Description |
---|---|---|
URL |
number | 1 the url will be downloaded and printed |
HTML |
number | 2 the passed string is assumed to be a complete html document .. .. |
INNERHTML |
number | 4 the passed string is a complete html document but missing the html tags |
STRING |
number | 8 the passed string is assumed to contain no html but may contain other language such as ZPL (for direct printing) |
Enum for type of content being posted to printHtml API
Type:
- number
DeviceSettingsObject
Information about and the settings to use with an output printing device See also: https://www.meadroid.com/Developers/KnowledgeBank/TechnicalReference/ScriptXServices/WebServiceAPIReference/PrintHtml/deviceinfoGET
.- Description:
Information about and the settings to use with an output printing device See also: https://www.meadroid.com/Developers/KnowledgeBank/TechnicalReference/ScriptXServices/WebServiceAPIReference/PrintHtml/deviceinfoGET
- Source:
Properties:
Name | Type | Description |
---|---|---|
printerName |
string | The name of the printer |
printToFileName |
string | The name of a the file to send print output to (for Windows PC and ) |
paperSizeName |
string | The descriptive name of the papersize, e.g. "A4" |
paperSourceName |
string | The descriptive name of the paper source, e.g. "Upper tray" |
collate |
CollateOptions | The collation to use when printing |
copies |
number | The number of copies to print |
duplex |
DuplexOptions | The dulex printing option |
units |
MeasurementUnits | Measurement units for papersize and margins |
paperPageSize |
PageSize | The size of the paper (in requested units) |
unprintableMargins |
Margins | The margin that cannot be printed in (in requested units) |
status |
number | Status code for the status of the device. Note this is not reliable, it is the cached return from the first server enquiry only. |
port |
string | Printer connection port name/description |
attributes |
number | Printer attributes |
serverName |
string | Name of the server to which the printer is connected |
shareName |
string | Name of the share |
location |
string | description of the location of the printer |
isLocal |
boolean | true if the printer is local to the server |
isNetwork |
boolean | true if the server is on the network |
isShared |
boolean | true if the printer is shared |
isDefault |
boolean | true if this is the default printer on the service |
bins |
Array.<string> | Array of the names of the available paper sources |
forms |
Array.<string> | Array of the names of the avbailable paper sizes |
Information about and the settings to use with an output printing device See also: https://www.meadroid.com/Developers/KnowledgeBank/TechnicalReference/ScriptXServices/WebServiceAPIReference/PrintHtml/deviceinfoGET
DuplexOptions
Enum to describe the duplex print option to use when printing
.- Description:
Enum to describe the duplex print option to use when printing
- Source:
Properties:
Name | Type | Description |
---|---|---|
DEFAULT |
number | 0 use the default at the print server |
SIMPLEX |
number | 1 |
VERTICAL |
number | 2 |
HORIZONTAL |
number | 3 |
Enum to describe the duplex print option to use when printing
Type:
- number
ErrorAction
Enum for required behaviour when an error occurs.
- Description:
Enum for required behaviour when an error occurs.
- Source:
Properties:
Name | Type | Description |
---|---|---|
REPORT |
number | 1 Call MeadCo.ScriptX.Print.reportServerError(errMsg) |
THROW |
number | 2 throw an error : throw errMsg |
Enum for required behaviour when an error occurs.
Type:
- number
Margins
Describe the margins within which to print.
- Description:
Describe the margins within which to print.
- Source:
Properties:
Name | Type | Description |
---|---|---|
left |
number | left margin in requested units |
top |
number | top margin in requested units |
right |
number | right margin in requested units |
bottom |
number | bottom margin in requested units |
Describe the margins within which to print.
MeasurementUnits
Enum to describe the units used on measurements.
- Description:
Enum to describe the units used on measurements. Please be aware that (sadly) these enum values do not match
the values by the MeadCo ScriptX COM Servers. Please use MeadCo.ScriptX.MeasurementUnits (declared in MeadCoScriptJS) for compatibility
- Source:
Properties:
Name | Type | Description |
---|---|---|
DEFAULT |
number | 0 use the default at the print server |
INCHES |
number | 1 |
MM |
number | 2 millimeters |
Enum to describe the units used on measurements. Please be aware that (sadly) these enum values do not match
the values by the MeadCo ScriptX COM Servers. Please use MeadCo.ScriptX.MeasurementUnits (declared in MeadCoScriptJS) for compatibility
Type:
- number
PageSize
Describe the size of a page by its width and height.
- Description:
Describe the size of a page by its width and height.
- Source:
Properties:
Name | Type | Description |
---|---|---|
width |
number | width of paper in requested units |
height |
number | height of paper in requested units |
Describe the size of a page by its width and height.
PrintStatus
Enum for status code returned to print progress callbacks
.- Description:
Enum for status code returned to print progress callbacks
- Source:
Properties:
Name | Type | Description |
---|---|---|
NOTSTARTED |
number | 0 |
QUEUED |
number | 1 |
STARTING |
number | 2 |
DOWNLOADING |
number | 3 |
DOWNLOADED |
number | 4 |
PRINTING |
number | 5 |
COMPLETED |
number | 6 |
PAUSED |
number | 7 |
PRINTPDF |
number | 8 |
ERROR |
number | 1 |
ABANDONED |
number | 2 These are internal and should not be seen. However it is known CODEEXEPTION can leak and be seen. |
COLLECTED |
number | 100 |
CODEEXEPTION |
number | 101 |
COMPLETEDWAITINGFORCOLLECTION |
number | 102 |
Enum for status code returned to print progress callbacks
Type:
- number
ServiceClasses
Enum for the class of service connected to.
- Description:
Enum for the class of service connected to.
- Source:
Properties:
Name | Type | Description |
---|---|---|
CLOUD |
number | 1 MeadCo Cloud Service |
ONPREMISE |
number | 2 ScriptX.Services for On Premise Devices |
WINDOWSPC |
number | 3 ScriptX.Services for Windows PC |
Enum for the class of service connected to.
Type:
- number
ServiceDescriptionObject
Information about the service that is connected to - version detail and facilities available See also: https://www.meadroid.com/Developers/KnowledgeBank/TechnicalReference/ScriptXServices/WebServiceAPIReference/ServiceDescription/GET
.- Description:
Information about the service that is connected to - version detail and facilities available See also: https://www.meadroid.com/Developers/KnowledgeBank/TechnicalReference/ScriptXServices/WebServiceAPIReference/ServiceDescription/GET
- Source:
Properties:
Name | Type | Description |
---|---|---|
serviceClass |
ServiceClasses | the class of the service; cloud, onpremise, pc |
currentAPIVersion |
string | the latest version implemented (eg 'v1' or 'v2' etc) |
serviceVersion |
VersionObject | implementation version of the service |
serverVersion |
VersionObject | The version of ScriptX Server used by the service |
serviceUpgrade |
VersionObject | The latest version of the service that is available and later than ServiceVersion/me |
availablePrinters |
Array.<string> | Array of the names of the available printers |
printHTML |
boolean | Printing of HTML is supported |
printPDF |
boolean | Printing of PDF documents is supported |
printDIRECT |
boolean | Direct printing to a print device is supported |
Information about the service that is connected to - version detail and facilities available See also: https://www.meadroid.com/Developers/KnowledgeBank/TechnicalReference/ScriptXServices/WebServiceAPIReference/ServiceDescription/GET
VersionObject
Description of a code version.
- Description:
Description of a code version. Semver is used
- Source:
Properties:
Name | Type | Description |
---|---|---|
major |
int | The major version |
minor |
int | The minor version |
build |
int | The patch/hotfix version |
revision |
int | Internal revisions of a build/patch/hotfix |
majorRevision |
int | ignore |
minorRevision |
int | ignore |
Description of a code version. Semver is used