Print Manager
The Print Manager service (com.palm.printmgr
) provides two components and a number of APIs. These calls can be accessed in JavaScript with the standard calls provided for accessing system services. See the Enyo Javascript documentation for more information.
Methods
-
printers
-
add
-- Manually adds a printer that Zeroconf did not discover. -
delete
-- Deletes a manually added printer. -
getCapabilities
-- Returns printer capabilities. -
getCurrent
-- Gets the current printer for the user's currently connected LAN (SSID). -
list
-- Lists printers as they are added or removed either by Zeroconf or manually. -
listActive
-- Lists all the currently active printers. -
listAddedPrinters
-- Lists manually added printers. -
setCurrent
-- Sets the current printer for the user's currently connected LAN.
-
-
jobs
-
addFile
-- Adds file to print job. -
allAtOnce
-- Launches a print job with multiple JPEG files. -
cancel
-- Cancel the print job. -
close
-- Close the print job. -
editPrintParams
-- Modifies the current print parameters. -
getCurrentPrintParams
-- Returns the current print parameters. -
getFinalParamsAndArea
-- Validates print job parameters. -
getRenderStatus
-- Gets status of files being rendered or added. -
getStatus
-- Gets print job's status. -
listAll
-- Lists all Print Manager jobs. -
newTempFile
-- Creates a new file in the file cache. -
open
-- Opens a print job returning a job ID. -
resizeTempFile
-- Adjusts temporary file's allocated cache. -
setRenderStatus
-- Sets status when WebKit is finished rendering a job.
-
Print Jobs Overview
Basic end-to-end process for print jobs:
- Open a print job -- Call jobs/open with a subscription so the print job can be cancelled if the calling app crashes or exits.
- Get the job's print parameters-- Use jobs/getCurrentPrintParams.
- If necessary, modify the job's print parameters-- Use jobs/editPrintParams
- Check final job parameters -- The Print Manager may modify your edits, so check the final values with jobs/getFinalParamsAndArea
- Add job files -- Add JPEG files to the job with jobs/addFile.
- Close the print job -- Call jobs/close.
The Print Manager can print an existing file (i.e., a photo) or a temporary file (i.e., a WebKit rendered Web page).
WebKit Rendering
WebKit rendering can be used to generate files for printing. If pages are being rendered to a temporary file, the methods jobs/newTempFile and jobs/resizeTempFile are needed to create and grow the file as the page is being rendered.
After the page is rendered, you can add the temporary file to the job using jobs/addFile. All this is done by WebKit.
Job and Rendering Staus
You can obtain rendering status and job status via subscriptions to jobs/getRenderStatus and jobs/getStatus.
About the Code Samples
The code samples were done using luna-send
, a webOS utility you can invoke from a command-line shell on the device. You can open a shell using putty
(Windows) or ssh
(Mac). Another option is to use novaterm
. The webOS SDK comes with both putty
and novaterm
.
If you are using a HP/Palm TouchPad for testing, then:
- The TouchPad should have webOS 3.0 or higher installed.
- You should have a USB cord to connect the device to your development machine.
- The TouchPad should be charged and prepared.
To open a shell and log in to the device:
-
Open a command prompt.
On Windows type:
putty -P 10022 root@localhost
On the Mac OS X:
ssh -p 10022 root@localhost
-
Press "Enter" at the password prompt.
printers/add
Manually adds a printer that Zeroconf did not discover. Printer must be present on the SSID.
Syntax
{ "printerID" : string, "printerName" : string, "printerAddress" : string }
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
printerID | Yes | string | Printer ID. |
printerName | Yes | boolean | Printer name (can be same as printerID). |
printerAddress | Yes | string | Printer's IPv4 address. |
Returns
{ "returnValue" : boolean, "errorCode" : int, "errorText" : string }
Parameter | Required | Type | Description |
---|---|---|---|
returnValue | Yes | boolean |
true (success) or false (failure).
|
errorCode | No | int | Error code returned on failure. Possible values: -201, -203, -204, -205, -206. See Error Codes table for full text. |
errorText | No | string | Error message returned on failure. |
Example
luna-send -n 1 palm://com.palm.printmgr/printers/add '{"printerID":"cat","printerName":"Mister", "printerAddress":"192.168.0.213"}'
Example Output
{ "returnValue":true }
printers/delete
Deletes a manually added printer. Only manually added printers can be deleted, not ones that Zeroconf automatically discovers. If the ssid
optional parameter is passed, then the manually added printer does not need to currently be accessible on the SSID.
Syntax
{ "printerID" : string, "ssid" : string }
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
printerID | Yes | string | Printer ID |
ssid | No | string | Printer's SSID. |
Returns
{ "returnValue" : boolean, "errorCode" : int, "errorText" : string }
Parameter | Required | Type | Description |
---|---|---|---|
returnValue | Yes | boolean |
true (success) or false (failure)
|
errorCode | No | int | Error code returned on failure. Possible values: -201, -202. See Error Codes table for full text. |
errorText | No | string | Error message returned on failure. |
Example
luna-send -n 1 palm://com.palm.printmgr/printers/delete '{"printerID":"RC","ssid":"MySSID"}'
Example Output
{ "returnValue":true }
printers/getCapabilities
Given a printer ID, returns printer capabilities. You can subscribe to printers/list to obtain a printer ID.
Syntax
{ "printerID" : string }
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
printerID | Yes | string | Printer ID |
Returns
{ "returnValue" : boolean, "errorCode" : int, "errorText" : string, "mediaSize" : string array, "mediaType" : string array, "trays" : string array, "canDuplex" : boolean, "hasPhotoTray" : boolean, "canPrintBorderless" : boolean, "canPrintQualityDraft" : boolean, "canPrintQualityNormal" : boolean, "canPrintQualityHigh" : boolean, "hasColor" : boolean, "hasFaceDownTray" : boolean, "isSupported" : boolean, "canCancel" : boolean }
Parameter | Required | Type | Description |
---|---|---|---|
returnValue | Yes | boolean |
true (success) or false (failure)
|
errorCode | No | int | Error code returned on failure. Possible values: -201, -202, -207, and -238. See Error Codes table for full text. |
errorText | No | string | Error message returned on failure. |
mediaSize | Yes | string array | Supported media sizes. |
mediaType | Yes | string array | Supported media types. |
trays | Yes | string array | Supported media types. |
canDuplex | Yes | boolean |
true if duplex supported.
|
hasPhotoTray | Yes | boolean |
true if printer has a photo tray.
|
canPrintBorderless | Yes | boolean |
true if printer can print borderless.
|
canPrintQualityDraft | Yes | boolean |
true if a draft mode is supported.
|
canPrintQualityNormal | Yes | boolean |
true if a normal quality is supported.
|
canPrintQualityHigh | Yes | boolean |
true if a best mode is supported.
|
hasColor | Yes | boolean |
true if printing in color is option.
|
hasFaceDownTray | Yes | boolean |
true if the printout is face down in the tray.
|
isSupported | Yes | boolean |
true if printer supports HP pcl5 or pcl3gui protocol, meaning the Print Manager knows how to "talk" to it.
|
canCancel | Yes | boolean |
true if printer supports an explicit cancel command, false if cancel requires shutting the connection. This is for internal logging purposes ONLY and should not be exposed to the user. |
Example
luna-send -n 1 -f palm://com.palm.printmgr/printers/getCapabilities '{"printerID":" Photosmart Prem C410 series [E8D0A1]"}'
Example Output
{ "returnValue":true, "errorCode":0, "mediaSize":[ "ISO_A4", "HAGAKI", "Photo_4x6", "Photo_L", "Photo_5x7", "Photo_10x15", "ISO_A6", "Photo_8x10", "Photo_5x7_MainTray" ], "mediaType":[ "Plain", "Photo", "Photo Glossy", "Premium Photo", "Advanced Photo" ], "trays":[ "Auto", "Tray1", "Photo" ], "canDuplex":true, "hasPhotoTray":true, "canPrintBorderless":true, "canPrintQualityDraft":true, "canPrintQualityNormal":true, "canPrintQualityHigh":true, "hasColor":true, "hasFaceDownTray":false, "isSupported" : true, "canCancel":false }
printers/getCurrent
Gets the current printer for the user's currently connected LAN.
Syntax
{}
Parameters
None
Returns
{ "returnValue" : boolean, "errorCode" : int, "errorText" : string, "printerID" : string, "printerName" : string, "printerAddress" : string }
Parameter | Required | Type | Description |
---|---|---|---|
returnValue | Yes | boolean |
true (success) or false (failure).
|
errorCode | No | int | Error code returned on failure. Possible values: -201. See Error Codes table for full text. |
errorText | No | string | Error message returned on failure. |
printerID | Yes | string | Printer ID. Returns empty string ("") if no current printer exists. |
printerName | Yes | string | Printer name. Returns empty string ("") if no current printer exists. |
printerAddress | Yes | string | Printer IPv4 address. Returns empty string ("") if no current printer exists. |
Example
luna-send -n 1 -f palm://com.palm.printmgr/printers/getCurrent '{}'
Example Output
{ "returnValue": true, "printerID": "eStn", "printerName": "Zeus", "printerAddress": "192.168.1.102" }
printers/list
Lists printers as they are added or removed, either via Zeroconf or manually. Apps need to subscribe to this to get the list.
Syntax
{ subscribe : boolean }
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
subscribe | Yes | boolean |
Must be true to return list.
|
Returns
One of the following is returned for each printer.
{ "returnValue" : boolean, "errorCode" : int, "errorText" : string, "subscribed" : boolean, [{ "printerID" : string, "printerName" : string, "printerAddress" : string, "eventType" : string "source" : string }] }
Parameter | Required | Type | Description |
---|---|---|---|
returnValue | Yes | boolean |
true (success) or false (failure).
|
errorCode | No | int | Error code returned on failure. Possible values: -201. See Error Codes table for full text. |
errorText | No | string | Error message returned on failure. |
printerID | No | string | Printer ID. |
printerName | No | string | Printer name. |
printerAddress | No | string | Printer IP address. |
eventType | No | string | "Add" or "Rmv". |
source | No | string | fromZeroconf|fromManualAdd |
Example
luna-send -i palm://com.palm.printmgr/printers/list '{"subscribe":true}'
Example Output
{"returnValue":true,"subscribed":true} {"printerID":"HP LaserJet 400 color M451 ","printerName":"HP LaserJet 400 color M451","printerAddress":"192.168.1.100","eventType":"Add","source":"fromZeroconf"} {"printerID":"Photosmart Prem C410 ","printerName":"Photosmart Prem C410 seri[E8D0A1]","printerAddress":"192.168.1.2","eventType":"Add","source":"fromManualAdd"} {"printerID":"Ubuntu Print to PDF Printer","printerName":"Ubuntu Print to PDF Printer","printerAddress":"192.168.1.34","eventType":"Add","source":"fromZeroconf"} {"printerID":"eStn","printerName":"Zeus","printerAddress":"192.168.22.76","eventType":"Add","source":"fromZeroconf"} {"printerID":"eStn","printerName":"Zeus","printerAddress":"192.168.22.76","eventType":"Rmv","source":"fromZeroconf"}
printers/listActive
Lists the currently "active" printers on the current WLAN (SSID) that Zeroconf automatically discovered or were manually added. Unlike printer/list, more data for each printer is returned and there is no subscription. All the printers are returned in an array in one response. This API is included mainly as a debugging aid and not for general usage.
Syntax
{}
Parameters
None
Returns
{ "returnValue" : boolean, "errorCode" : int, "errorText" : string, "activePrinters" : [ { "printerID" : string, "printerName" : string, "printerAddress" : string, "zeroconfFullName" : string, "supportsIpp" : boolean, "supportsPdl" : boolean, "source" : string } ] }
Parameter | Required | Type | Description |
---|---|---|---|
returnValue | Yes | boolean |
true (success) or false (failure)
|
errorCode | No | int | Error code returned on failure. Possible values: -201. See Error Codes table for full text. |
errorText | No | string | Error message returned on failure. |
activePrinters | Yes | object array | Inline array of active printer objects, see fields below. |
printerID | No | string | ID of active printer for the SSID, empty string ("") if none set. |
printerName | No | string | Active printer name, may be the same as the ID. |
zeroconfFullName | No | string | Full Zeroconf (Bonjour) name, i.e., "HP\032LaserJet\032color\032M451dn\032(AA7EBC)._ipp._tcp.local." |
supportsIpp | No | string | Supports IPP (Internet Printing Protocol) flag. |
supportsPdl | No | string | Supports PDL (Page Description Language) flag. |
source | No | string | "fromZeroconf" (printer was automatically discovered (Bonjour)), or "fromManualAdd" (printer was manually added). |
Example
luna-send -n 1 -f palm://com.palm.printmgr/printers/listActive '{}'
Example Output
{ "returnValue":true, "activePrinters":[ { "printerID":"192.168.1.100", "printerName":"Laser", "printerAddress":"192.168.1.100", "zeroconfFullName":"HP\\032LaserJet\\032color\\032M451dn\\032(AA7EBC)._ipp._tcp.local.", "supportsIpp":false, "supportsPdl":true, "source":"fromZeroconf" }, { "printerID":"192.168.1.103", "printerName":"eStation", "printerAddress":"192.168.1.103", "zeroconfFullName":"NULL", "supportsIpp":false, "supportsPdl":true, "source":" fromManualAdd " } ] }
printers/listAddedPrinters
Lists manually added printers.
Some printers cannot be discovered via Zeroconf (Bonjour), which could occur if the printer does not support Zeroconf, or has support turned off, or because its WLAN is blocking multicast messages.
In this case, manually adding a printer is supported. You can only add a printer that is currently available and is not previously added (either manually or thru Zeroconf). You can only delete a manually added printer. This API returns a list of manually added printers for either the current access point (SSID) or for all SSIDs.
Syntax
{ ssidAll : boolean }
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
ssidAll | No | boolean |
If true , manually added printers for all SSIDs are returned; otherwise, only the list for the current SSID is returned.
|
Returns
{ "returnValue" : boolean, "errorCode" : int, "errorText" : string, "addList" : [ { printerID : string, printerName : string, printerAddress : string ssid : string } ] }
Parameter | Required | Type | Description |
---|---|---|---|
returnValue | Yes | boolean |
true (success) or false (failure).
|
errorCode | No | int | Error code returned on failure. Possible values: -201, -209. See Error Codes table for full text. |
errorText | No | string | Error message returned on failure. |
addList | Yes | object array | Inline object array -- see fields below. |
printerID | No | string | Printer ID. |
printerName | No | string | Printer name. |
printerAddress | No | string | Printer IPv4 address. |
ssid | No | string | SSID of WLAN the printer is connected to. |
Example
luna-send -n 1 -f palm://com.palm.printmgr/printers/listAddedPrinters '{"ssidAll":true}'
Example Output
{ "returnValue": true, "addList":[ { "printerID":"eStn", "printerName":"Zeus", "printerAddress":"192.168.1.102", "ssid":"CPayneTestWLAN" }, { "printerID":"Bart", "printerName":"Bart", "printerAddress":"255.255.0.1", "ssid":"MY_SSID" } ] }
printers/setCurrent
Sets the current printer for the user's currently connected WLAN (SSID). A different current printer can be set for each access point.
Syntax
{ printerID : string }
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
printerID | Yes | string | Printer ID |
Returns
{ "returnValue" : boolean, "errorCode" : int, "errorText" : string }
Parameter | Required | Type | Description |
---|---|---|---|
returnValue | Yes | boolean |
true (success) or false (failure).
|
errorCode | No | int | Error code returned on failure. Possible values: -201, -202, and -208. See Error Codes table for full text. |
errorText | No | string | Error message returned on failure. |
Example
luna-send -n 1 -f palm://com.palm.printmgr/printers/setCurrent '{"printerID":"eStn"}'
Example Output
{ "returnValue": true }
jobs/addFile
Adds file (JPEG) to print job.
Insets can optionally be set on a per page basis, overriding those specified for the job. Do not specify insets for jobs printing in borderless mode. Insets must be larger than the (corresponding) page margins.
It is expected that if the file already exists, or is WebKit rendered, that insets will be specified for the job as a whole using jobs/editPrintParameters, and not be specified as part of jobs/addFile.
Syntax
{ "jobID" : int, "pathName" : string, "currentPage" : int, "totalPages" : int, "topInset" : float, "leftInset" : float, "rightInset" : float, "bottomInset" : float }
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
jobID | Yes | int | Printer ID. |
pathName | Yes | string |
Path to file, i.e., "/media/internal/1.jpg ".
|
currentPage | Yes | int | Current page (1,2,3,...etc.) |
totalPages | Yes | int | Total pages to add to job. Should be set to 0 if this is unknown. |
topInset | No | float | App-specified margin from top (in inches) if not operating in borderless mode. |
leftInset | No | float | App-specified margin from left (in inches) if not operating in borderless mode. |
rightInset | No | float | App-specified margin from right (in inches) if not operating in borderless mode. |
bottomInset | No | float | App-specified margin from bottom (in inches) if not operating in borderless mode. |
Returns
{ "returnValue" : boolean, "errorCode" : int, "errorText" : string }
Parameter | Required | Type | Description |
---|---|---|---|
returnValue | Yes | boolean |
true (success) or false (failure).
|
errorCode | No | int | Error code returned on failure. Possible values: -201, -213, -214, -216, -219, -220, -222 and -232. See Error Codes table for full text. |
errorText | No | string | Error message returned on failure. |
Example
luna-send -n 1 palm://com.palm.printmgr/jobs/addFile '{"jobID":1,"pathName":"/media/internal/1.jpg", "currentPage":1, "totalPages":2}'
Example Output
{ "returnValue":true }
jobs/allAtOnce
Initiates a print job with multiple JPEG files; intended primarily as an aid to scripted testing as it is easier than carrying the job ID across a sequence of method calls such as open/addFile/close.
Syntax
{ "printerID" : string, "description" : string, "appName" : string, "pathnames" : string array }
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
printerID | Yes | string | Printer ID or IPv4 address. |
description | Yes | string | Job description. |
appName | Yes | string | Application name. |
pathnames | Yes | string array | Documents' full pathname, minimum of one. |
Returns
{ "returnValue" : boolean, "errorCode" : int, "errorText" : string, "jobID" : int }
Parameter | Required | Type | Description |
---|---|---|---|
returnValue | Yes | boolean |
true (success) or false (failure)
|
errorCode | No | int | Error code returned on failure. Possible values: -201, -213, -214, -215, -216, -218, -219, and -221. See Error Codes table for full text. |
errorText | No | string | Error message returned on failure. |
jobID | No | int | ID of new job. |
Example
luna-send -n 1 palm://com.palm.printmgr/jobs/allAtOnce '{"printerID":"192.168.1.113","description":"desc","appName":"app","pathNames":["/media/internal/2.jpg"]}'
Example Output
{ "returnValue":true, "jobID":4 }
jobs/cancel
Cancels a print job.
Syntax
{ "jobID" : int }
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
jobID | Yes | int | Job ID. |
Returns
One of the following is returned for each printer.
{ "returnValue" : boolean, "errorCode" : int, "errorText" : string }
Parameter | Required | Type | Description |
---|---|---|---|
returnValue | Yes | boolean |
true (success) or false (failure).
|
errorCode | No | int | Error code returned on failure. Possible values: -201, -214, and -217. See Error Codes table for full text. |
errorText | No | string | Error message returned on failure. |
Example
luna-send -n 1 palm://com.palm.printmgr/jobs/cancel '{"jobID":1}'
Example Output
{ "returnValue":true }
jobs/close
Closes the print job; this means that no more pages can be added. Note that this does not mean page printing is done, but does allow the Print Manager to start the next copy for multi-copy jobs.
Syntax
{ "jobID" : int }
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
jobID | Yes | int | Job ID |
Returns
{ "returnValue" : boolean, "errorCode" : int, "errorText" : string }
Parameter | Required | Type | Description |
---|---|---|---|
returnValue | Yes | boolean |
true (success) or false (failure).
|
errorCode | No | int | Error code returned on failure. Possible values: -201, -214, and -223. See Error Codes table for full text. |
errorText | No | string | Error message returned on failure. |
Example
luna-send -n 1 palm://com.palm.printmgr/jobs/close '{"jobID":1}'
Example Output
{ "returnValue": true }
jobs/editPrintParams
Change the Print Manager's print parameters with passed values. Call printer/getCapabilities to get supported printer parameters.
Insets set here apply to all job pages. You can override insets on a page by page basis using jobs/addFile if rendering is done on a page basis and different insets are needed for different pages.
Insets should not be set if borderless
is true
and they should be larger then (or equal to) the printer margins for the selected media size. The jobs/getFinalParamsAndArea API can validate this and adjust them if they are smaller.
Note: If the input data is wider than the printable area, an equal amount of data is dropped on either side. If the input data is higher than the printable area, an equal amount of data is dropped from the top and the bottom. The image's aspect ratio is maintained.
Syntax
{ "jobID" : int, "mediaSize" : string, "mediaType" : string, "printQuality" : string, "duplex" : string, "dryTime" : string, "color" : string, "tray" : string, "numCopies" : int, "borderless" : boolean, "autoRotate" : boolean, "autoScale" : boolean, "topInset" : float, "leftInset" : float, "rightInset" : float, "bottomInset" : float }
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
jobID | Yes | int | Job ID. |
mediaSize | No | string | Supported media sizes. Must be one of the media sizes returned in printer/getCapabilities. |
mediaType | No | string | Supported media types. Must be one of the media types returned in printer/getCapabilities. Note that some printers have media sensors in the tray. For these printers, the media type must match what is in the tray; otherwise, the printer front panel could display warning or error messages. |
printQuality | No | string | Options: "Fast", "Normal", or "Best", assuming equivalent qualities supported in printer/getCapabilities. |
duplex | No | string | Options: "None" , "Book", or "Tablet". Use "None" if single-sided print is desired, "Tablet" if duplex is desired. |
dryTime | No | string | Options: "Normal", "Lower", or "Minimum". Indicates the time needed to allow ink to dry. Usually not changed from default. |
color | No | string | Options: "Mono", or "Color" (if color is supported in printer/getCapabilities). |
tray | No | string | Output tray, must be one of the trays returned in printer/getCapabilities. |
numCopies | No | int | Number of copies (1-99). |
borderless | No | boolean |
true if print should extend to the edges of the media; false otherwise.
|
autoRotate | No | boolean |
If true , input data is rotated to best match the printable area. Landscape photos are rotated to the printer's photo paper orientation while not affecting portrait photos.
|
autoScale | No | boolean |
If true , input data is rotated to best match the printable area with the necessary scaling applied, while maintaining the aspect ratio, to fill the entire printable area. Aside from scaling, this flag implies autoRotate , placing the vertical center of the input data at the vertical center of the printable area and placing the horizontal center of the input data at the horizontal center of the printable area, using an equal amount of input data on either side to fill the printable area.
|
topInset | No | float | App-specified margin from top (in inches) if not operating in borderless mode. |
leftInset | No | float | App-specified margin from left (in inches) if not operating in borderless mode. |
rightInset | No | float | App-specified margin from right (in inches) if not operating in borderless mode. |
bottomInset | No | float | App-specified margin from bottom (in inches) if not operating in borderless mode. |
Returns
If a parameter is unrecognized, it is listed in the returned errorText
. Only the first invalid parameter detected is listed in the errorText
. If a parameter is valid, but not supported in the capabilities, it is set to a default. The paramsAdjusted
flag returned from getFinalParamsAndArea indicates if this occurred.
{ "returnValue" : boolean, "errorCode" : int, "errorText" : string }
Parameter | Required | Type | Description |
---|---|---|---|
returnValue | Yes | boolean |
true (success) or false (failure)
|
errorCode | No | int | Error code returned on failure. Possible values: -201, -214, -224, -225, -226, -227, -228, -229, -230, and -234. See Error Codes table for full text. |
errorText | No | string | Error message returned on failure. |
Example
luna-send -n 1 -f palm://com.palm.printmgr/jobs/editPrintParams '{"jobID":1, "mediaSize":"US_Letter", "dryTime":"Lower", "color":"Color", "borderless":false, "autoRotate": false, "leftInset":1.5,"topInset":1.0,"rightInset":0.75,"bottomInset":0.5}'
Example Output
{ "returnValue": true }
jobs/getCurrentPrintParams
Returns the contents of the Print Manager's print parameters. Initially, these default to pre-defined print subsystem values, which you can change with jobs/editPrintParams.
Syntax
{ "jobID" : int }
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
jobID | Yes | int | Job ID |
Returns
{ "returnValue" : boolean, "errorCode" : int, "errorText" : string, "jobID" : int, "mediaSize" : string, "mediaType" : string, "printQuality" : string, "duplex" : string, "dryTime" : string, "color" : string, "tray" : string, "numCopies" : int, "borderless" : boolean, "autoRotate" : boolean, "autoScale" : boolean, "topInset" : float, "leftInset" : float, "rightInset" : float, "bottomInset" : float, "pageTopMargin" : float, "pageLeftMargin" : float, "pageBottomMargin" : float, "pageHeight" : float, "pageWidth" : float }
Parameter | Required | Type | Description |
---|---|---|---|
returnValue | Yes | boolean |
true (success) or false (failure).
|
errorCode | No | int | Error code returned on failure. Possible values: -201, and -214. See Error Codes table for full text. |
errorText | No | string | Error message returned on failure. |
mediaSize | Yes | string | Supported media size. |
mediaType | Yes | string | Supported media type. |
printQuality | Yes | string | "Fast", "Normal", or "Best". |
duplex | Yes | string | "None" , "Book", or "Tablet". Use "None" if single-sided print is desired, "Tablet" if duplex is desired. |
dryTime | Yes | string | "Normal", "Lower", or "Minimum". Indicates the time needed to allow ink to dry. Usually not changed from default. |
color | Yes | string | "Mono", or "Color". |
tray | Yes | string | Output tray. |
numCopies | Yes | int | Number of copies (1-99) |
borderless | Yes | boolean |
true if print should extend to the edges of the media; false otherwise.
|
autoRotate | Yes | boolean |
If true , input data is rotated to best match the printable area. Landscape photos are rotated to the printer's photo paper orientation while not affecting portrait photos.
|
autoScale | Yes | boolean |
If true , input data is rotated to best match the printable area with the necessary scaling applied, while maintaining the aspect ratio, to fill the entire printable area. Aside from scaling, this flag implies autoRotate , placing the vertical center of the input data at the vertical center of the printable area and placing the horizontal center of the input data at the horizontal center of the printable area, using an equal amount of input data on either side to fill the printable area.
|
topInset | No | float | App-specified margin from top (in inches) if not operating in borderless mode. |
leftInset | No | float | App-specified margin from left (in inches) if not operating in borderless mode. |
rightInset | No | float | App-specified margin from right (in inches) if not operating in borderless mode. |
bottomInset | No | float | App-specified margin from bottom (in inches) if not operating in borderless mode. |
pageTopMargin | Yes | float | Printer-specified margin from top in inches. Cannot be changed by app. |
pageLeftMargin | Yes | float | Printer-specified margin from left in inches. Cannot be changed by app. |
pageRightMargin | Yes | float | Printer-specified margin from right in inches. Cannot be changed by app. |
pageBottomMargin | Yes | float | Printer-specified margin from bottom in inches. Cannot be changed by app. |
pageHeight | Yes | float | Page height in inches. Cannot be changed by app. |
pageWidth | Yes | float | Page width in inches. Cannot be changed by app. |
Example
luna-send -n 1 -f palm://com.palm.printmgr/jobs/getCurrentPrintParams '{"jobID":1}'
Example Output
{ "returnValue":true, "mediaSize":"US_Letter", "mediaType":"Plain", "printQuality":"Normal", "duplex":"None", "dryTime":"Normal", "color":"Color", "tray":"Auto", "numCopies":1, "borderless":false, "autoRotate":false, "autoScale":false, "topInset ":0.125, "leftInset ":0.125, "rightInset ":0.125, "bottomInset ":0.125, "pageTopMargin ":0.125, "pageLeftMargin ":0.125, "pageRightMargin ":0.125, "pageBottomMargin ":0.125, "pageHeight ":11.0, "pageWidth ":8.5 }
jobs/getFinalParamsAndArea
Returns validated job parameters and height and width in pixels for WebKit rendering.
Will alter job parameters if requested parameters are not possible, for example: asking for duplex AND the photo tray. The returned paramsAdjusted
flag is true
if any parameter was altered. If this happens, the caller can compare the returned parameters with the original to determine if any action is needed before starting to add pages to the job. These actions are optional, but could include asking the user for more info, calling jobs/editPrintParams with new values, and calling jobs/GetFinalAreaAndParams again.
Adjusts insets if they are smaller than the page margins for the selected media size.
Syntax
{ "jobID" : int }
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
jobID | Yes | int | Job ID |
Returns
{ "returnValue" : boolean, "errorCode" : int, "errorText" : string, "jobID" : int, "mediaSize" : string, "mediaType" : string, "printQuality" : string, "duplex" : string, "dryTime" : string, "color" : string, "tray" : string, "numCopies" : int, "borderless" : boolean, "autoRotate" : boolean, "topInset" : float, "leftInset" : float, "rightInset" : float, "bottomInset" : float, "pageTopMargin" : float, "pageLeftMargin" : float, "pageRightMargin" : float, "pageBottomMargin" : float, "paramsAdjusted" : boolean, "pixel_units" : int, "width" : int, "height" : int, "renderInReverseOrder" : boolean }
Parameter | Required | Type | Description |
---|---|---|---|
returnValue | Yes | boolean |
true (success) or false (failure)
|
errorCode | No | int | Error code returned on failure. Possible values: -201, -214, -220 -234, and -235. See Error Codes table for full text. |
errorText | No | string | Error message returned on failure. |
mediaSize | Yes | string | Supported media size. |
mediaType | Yes | string | Supported media type. |
printQuality | Yes | string | "Fast", "Normal", or "Best". |
duplex | Yes | string | "None", "Book", or "Tablet". Use "None" if single-sided print is desired, "Tablet" if duplex is desired. |
dryTime | Yes | string | "Normal", "Lower", or "Minimum". Indicates the time needed to allow ink to dry. Usually not changed from default. |
color | Yes | string | "Mono" or "Color". |
tray | Yes | string | Output tray. |
numCopies | Yes | int | Number of copies (1-99) |
borderless | Yes | boolean |
true if print should extend to the edges of the media; false otherwise.
|
autoRotate | Yes | boolean |
If true , input data is rotated to best match the printable area. Landscape photos are rotated to the printer's photo paper orientation while not affecting portrait photos.
|
topInset | No | float | App-specified margin from top (in inches) if not operating in borderless mode. |
leftInset | No | float | App-specified margin from left (in inches) if not operating in borderless mode. |
rightInset | No | float | App-specified margin from right (in inches) if not operating in borderless mode. |
bottomInset | No | float | App-specified margin from bottom (in inches) if not operating in borderless mode. |
pageTopMargin | Yes | float | Printer-specified margin from top in inches. Cannot be changed by app. |
pageLeftMargin | Yes | float | Printer-specified margin from left in inches. Cannot be changed by app. |
pageRightMargin | Yes | float | Printer-specified margin from right in inches. Cannot be changed by app. |
pageBottomMargin | Yes | float | Printer-specified margin from bottom in inches. Cannot be changed by app. |
paramsAdjusted | Yes | boolean |
true if any parameter was changed.
|
pixel_units | Yes | int | Needed by WebKit for rendering. Same as DPI. |
width | Yes | int | Width of printable area in pixels (minus insets and margins). Needed by WebKit for rendering. |
height | Yes | int | Height of printable area in pixels (minus insets and margins). Needed by WebKit for rendering. |
renderInReverseOrder | Yes | boolean |
Needed by WebKit -- indicates the page rendering order. There are two classes of printers: ones that place the printed page in the out tray face down (typically lasers), and ones that place them face up (most inkjets). The user wants to pick up the stack with page one on top facing out. So, for a face-up printer, this flag should be true so pages are printed in reverse order, ..., 3, 2, 1. This way, page one appears on top, face up.
|
Example
luna-send -n 1 -f palm://com.palm.printmgr/jobs/getFinalParamsAndArea '{"jobID":1}'
Example Output
{ "returnValue":true, "mediaSize":"Photo_4x6", "mediaType":"Plain", "printQuality":"Normal", "duplex":"None", "dryTime":"Lower", "color":"Color", "tray":"Photo", "numCopies":1, "borderless":false, "autoRotate":true, "autoScale":true, "topInset ":1, "leftInset ":1, "rightInset ":1, "bottomInset ":1, "pageTopMargin ":0.125, "pageLeftMargin ":0.125, "pageRightMargin ":0.125, "pageBottomMargin ":0.125, "paramsAdjusted":false, "pixelUnits":300, "width":1125, "height":1725, "renderInReverseOrder":true }
jobs/getRenderStatus
Returns status as files are being rendered/added. Status during printing is handled separately (although in multipage jobs they overlap).
Apps that want render status should subscribe before starting a job. The methods jobs/setRenderStatus and jobs/addFile both update render status.
Note: Use getStatus to subscribe to print status.
Syntax
{ "subscribe" : boolean }
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
subscribe | Yes | boolean |
Must be true to get status.
|
Returns
{ "jobID" : int, "currentPage" : int, "totalPages" : int, "renderResultCode" : int, "renderResultText" : string }
Parameter | Required | Type | Description |
---|---|---|---|
jobID | Yes | int | Job ID. |
currentPage | No | int | Current page being rendered. |
totalPages | No | int | Total pages rendered. |
renderResultCode | No | int | Returned when rendering is done. 0 if okay, a negative number if error. |
renderResultText | No | string | Error message returned on failure. |
Example
luna-send -i palm://com.palm.printmgr/jobs/getRenderStatus '{"subscribe":true}'
Example Output
{"jobID":2,"currentPage":0,"totalPages":0} {"jobID":3,"currentPage":1,"totalPages":2} {"jobID":3,"currentPage":2,"totalPages":2} {"jobID":3,"renderResultCode":0} {"jobID":4,"currentPage":1,"totalPages":1} {"jobID":4,"renderResultCode":-1301,"renderResultText":"an Unknown error occurred"}
jobs/getStatus
Returns print job status. Once subscribed, status of jobs is updated as the job progresses.
Status is provided for each job state transition, at the start of each page, and at the end of each page.
Syntax
{ "subscribe" : boolean }
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
subscribe | Yes | boolean |
Must be true to get status.
|
Returns
{ "jobID" : int, "printerID" : string, "description" : string, "appName" : string, "statusId" : string, "printerState" : string, "currentPage" : int, "totalPages" : int, "timeActive" : int, "timeFromQueue" : int, "jobStatus" : string, "blockedReasons" : string, "pageNum" : int, "copyNum" : int, "currentPage" : int, "totalPages" : int, "pageCorrupted" : int, "pageTime" : int }
Parameter | Required | Type | Description |
---|---|---|---|
jobID | Yes | int | Job ID. |
printerID | Yes | string | Printer ID |
description | Yes | string | App-provided job description. |
appName | Yes | string | Application name. |
statusId | Yes | string | "JOBSTATE" if job state transition, "PAGESTARTINFO" if page start or "PAGEINFO" if page end. |
printerState | No | string |
Returned if statusId="JOBSTATE" . Can be "QUEUED", "RUNNING", "BLOCKED", or "DONE".
|
currentPage | No | string |
Returned if statusId="JOBSTATE" . Current page that is printing.
|
totalPages | No | string |
Returned if statusId="JOBSTATE" . Calculated when last page is added; -1 before this occurs.
|
timeActive | No | int |
Returned if printerState="DONE" . The time since the job last entered the active phase (i.e., RUNNING to DONE).
|
timeFromQueue | No | int |
Returned if printerState="DONE" . The time since the job entered the queue (QUEUED to DONE).
|
jobStatus | No | string |
Returned if printerState="DONE" . Job result - "Success", "Cancelled", "Error", or "Corrupt".
|
blockedReasons | No | string array |
Returned if printerState="BLOCKED" or printerState="RUNNING" . All of these conditions may not be returned as this is a superset of what can be returned. Blocking conditions not explicitly called out are grouped under "Service_Request". Most of the following only occur when printerState = BLOCKED , however "Low_On_Ink", "Low_On_Toner" can occur when printerState= RUNNING . One or more of the following:
|
pageNum | No | int |
Returned if statusId="PAGEINFOSTART" or PAGEINFO . Page number in 1 copy of the job that is being printed.
|
copyNum | No | int |
Returned if statusId="PAGEINFOSTART" or PAGEINFO . Copy that is being printed.
|
currentPage | No | int |
Returned if statusId="PAGEINFOSTART" or PAGEINFO . Current page being printed. This is calculated as "(copyNum-1)*totalPage + pageNum".
|
totalPages | No | int |
Returned if statusId="PAGEINFOSTART" or PAGEINFO . Calculated when last page is added; -1 before this occurs.
|
pageCorrupted | No | int |
Returned if statusId="PAGEINFOSTART" or PAGEINFO . This is true if the jpeg was corrupted, false otherwise.
|
pageTime | No | int |
Returned if statusId="PAGEINFOSTART" or PAGEINFO . Time since page start.
|
Example
luna-send -i palm://com.palm.printmgr/jobs/getStatus '{"subscribe":true}'
Example Output
{ "jobID":4, "printerID":"Photosmart Prem C410 series [E8D0A1]", "description":"desc", "appName":"app", "statusId":"JOBSTATE", "printerState":"QUEUED", "currentPage":0, "totalPages":0 } { "jobID":5, "printerID":"Photosmart Prem C410 series [E8D0A1]", "description":"desc", "appName":"app", "statusId":"JOBSTATE", "printerState":"RUNNING", "currentPage":1, "totalPages":-1, "blockedReasons":[ ] }, { "jobID":4, "printerID":"Photosmart Prem C410 series [E8D0A1]", "description":"desc", "appName":"app", "statusId":"PAGESTARTINFO", "pageNum":1, "copyNum":1, "currentPage":1, "totalPages":-1, "pageCorrupted":"false", "pageTime":0 }
jobs/listAll
Lists all Print Manager jobs, returned as an array. Each job's unprinted files are also returned as a sub-array. Pages already printed are not listed. This method is intended mainly for debugging.
Syntax
{}
Parameters
None
Returns
{ [ { "jobID" : int, "printerID" : string "printerAddress" : string, "description" : string, "appName" : string, "nextPageNumber" : int, "jobHandle" : string, "closed" : boolean, "pageFiles": [ { "page" : int, "temp" : boolean, "size" : int, "path" : string }, ... ] }, ... ] }
Parameter | Required | Type | Description |
---|---|---|---|
jobID | Yes | int | Job ID. |
printerID | Yes | string | Printer ID. |
printerAddress | Yes | string | Printer IPv4 address. |
description | Yes | string | App-provided job description. |
appName | Yes | string | Application name. |
nextPageNumber | Yes | int | Next page number in job. |
jobHandle | Yes | int | An opaque integer the Print Manager uses to identify a job. |
closed | Yes | boolean | Can more pages be added to job flag. |
pageFiles | Yes | object array | Inline object array, see fields below. |
page | No | int | Page number in job |
temp | No | boolean | Is this an existing file (i.e., a photo in the photo app) or a temporary file (i.e., a WebKet rendered file). Typically, the latter are page-sized JPEGs that WebKit renders when printing from the browser, e-mail, or Quick Office. The method jobs/newTempFile can be called to create these files and jobs/resizeTempFile to increase their size. A page image file is added to a job with jobs/addFile. The printing process frees temp files as they are no longer needed. |
size | No | int | Page size in bytes. Only used for temp files, for non-temp files this value is always 0. |
path | No | string | Page path. |
Example
luna-send -n 1 -f palm://com.palm.printmgr/jobs/listAll '{}'
Example Output
{ [ { "jobID":4, "printerID":"192.168.1.100", "printerAddress":"192.168.1.100", "description":"", "appName":"Photos", "nextPageNumber":3, "jobHandle":"0x403", "closed":true, "pageFiles":[ { "page":1, "temp":false, "size":0, "path":"\/media\/internal\/screencaptures\/Unknown_2011-09-03_221900.png" } ] }, { "jobID":5, "printerID":"192.168.1.100", "printerAddress":"192.168.1.100", "description":"", "appName":"Browser", "nextPageNumber":4, "jobHandle":"0x504", "closed":true, "pageFiles":[ { "page":1, "temp":true, "size":1334829, "path":"\/var\/file-cache\/printmgr_page_image\/e\/4IGdAAFJ.jpg" }, { "page":2, "temp":true, "size":212715, "path":"\/var\/file-cache\/printmgr_page_image\/T\/x9xnQAFK.jpg" } ] } ] }
jobs/newTempFile
Creates a new file in the file cache.
The Print Manager service can print existing page images or aid in the management of temporary files containing pages rendered as needed. In webOS, transient files are managed through the File Cache service, which is informed about the life cycle of temporary files and ensures that enough space is available. The Print Manager wraps the needed calls to the file cache with the newTempFile and resizeTempFile methods. Currently, only WebKit calls these while it is rendering the page.
Syntax
{ "fileExtension" : string, "jobID" : int, "size" : int }
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
fileExtension | Yes | string | File extension. Supports "jpg", "png", "ppm" and "pdf", though not all printers support ppm and pdf. |
jobID | Yes | int | Job ID. |
size | Yes | int | File size. |
Returns
{ "returnValue" : boolean, "errorCode" : int, "errorText" : string, "pathName" : string }
Parameter | Required | Type | Description |
---|---|---|---|
returnValue | Yes | boolean |
true (success) or false (failure).
|
errorCode | No | int | Error code returned on failure. Possible values: -201, -211, -212, -214, and -233. See Error Codes table for full text. |
errorText | No | string | Error message returned on failure. |
pathName | No | string | File path name. |
Example
luna-send -n 1 palm://com.palm.printmgr/jobs/newTempFile '{"fileExtension":"jpg", size:12345}
Example Output
{ "returnValue":true, "pathName":"/var/file-cache/printmgr_page_image/D/MuxIwAAC.jpg" }
jobs/open
Opens a print job and returns a Print Manager job ID which can be used in calls to getCurrentPrintParams, editPrintParams, getFinalParamsAndArea, addFile, close, and cancel.
Subscribing to this call (subscribe:true
) is strongly recommended to increase job robustness. Subscriptions are used when a call does not block waiting for a response. In one model, an app subscribes with a callback and, over time, receives a response or responses. In the model used here, the subscribed service (Print Manger) receives a signal if the subscriber goes away. So, if the calling app exits, the System Manager (luna-bus) can let the service know. If that happens, the Print Manager can close the job and perform necessary cleanup. However, apps can make this call without subscribing; this is primarily supported for scripted testing.
This call populates a job parameter structure with default parameters you can retrieve with getCurrentPrintParams.
Syntax
{ "printerID" : string, "description" : string, "appName" : string, "subscribe" : boolean }
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
printerID | Yes | string | Name or IPv4 address. Can be obtained from printers/list. |
description | Yes | string | Job description. |
appName | Yes | string | App name. |
subscribe | Yes | boolean |
Setting this to true is strongly recommended. See explanation in overview.
|
Returns
{ "returnValue" : boolean, "errorCode" : int, "errorText" : string, "jobID" : int, "subscribed" : boolean }
Parameter | Required | Type | Description |
---|---|---|---|
returnValue | Yes | boolean |
true (success) or false (failure).
|
errorCode | No | int | Error code returned on failure. Possible values: -201, -215, and -218. See Error Codes table for full text. |
errorText | No | string | Error message returned on failure. |
jobID | Yes | int | Job ID. |
subscribed | Yes | string | Has caller been subscribed flag. |
Example
luna-send -n 1 -i palm://com.palm.printmgr/jobs/open '{"printerID":"192.168.1.113","description":"desc","appName":"app"", "subscribe":true }'
Example Output
{ "returnValue":true, "jobID":1, "subscribed":true }
jobs/resizeTempFile
Adjusts the size of the cache allocated to the file, so the file has extra room as it grows or releases room it does not need. Call this before data is written to the file so the cache file can make room for the image. Needed only if rendering a page.
For each temp file, the Print Manager tracks the size passed to this API or newTempFile. When addFile is called with a temp file, the file's actual size is compared to the tracked size. If it is larger, an error (-232) is returned. If less, the Print Manager logs a debug message. This should be avoided.
The new file cache size is based on a worst case file size scenario. Files are rendered a band at a time. A band spans the width of the paper and, in the current implementation, is 300 pixels high. Since this is done in color, there are three bytes per pixel (red, green and blue). The worst case file size will be its current actual size, plus the worst case size of a band: (width in pixels * 3 * the height of the band in pixels). Because we are using the compressed JPEG format, the actual size after the band is rendered is less.
Syntax
{ "pathName" : string, "newSize" : int }
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
pathName | Yes | string | Returned from jobs/newTempFile. |
newSize | Yes | int | New cache size for file. |
Returns
{ "returnValue" : boolean, "errorCode" : int, "errorText" : string }
Parameter | Required | Type | Description |
---|---|---|---|
returnValue | Yes | boolean |
true (success) or false (failure)
|
errorCode | No | int | Error code returned on failure. Possible values: -201, -211, -212, -214, and -233. See Error Codes table for full text. |
errorText | No | string | Error message returned on failure. |
Example
luna-send -n 1 palm://com.palm.printmgr/jobs/resizeTempFile '{"pathName":" /var/file-cache/ printmgr_page_image/D/MuxIwAAC.jpg ","newSize":12345}'
Example Output
{ "returnValue" : true }
jobs/setRenderStatus
Render status when the rendering component (WebKit) is finished rendering the job. See getRenderStatus and jobs/addFile for additional operations related to render status.
Syntax
{ "jobID" : int, "renderResultCode" : int, "renderResultText" : string }
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
jobID | Yes | int | Job ID. |
renderResultCode | Yes | int | 0 success; otherwise, one of the following: -201, -211, -212, -213, -216, -219, -220, -222, -232,-233, -234, -235, -237, -301, -302, -303, or -304. See Error Codes table for full text. |
renderResultText | Yes | string | Rendering result message |
Returns
{ "returnValue" : boolean, "errorCode" : int, "errorText" : string }
Parameter | Required | Type | Description |
---|---|---|---|
returnValue | Yes | boolean |
true (success) or false (failure)
|
errorCode | No | int | Error code returned on failure. Possible codes: -201. See Error Codes table for full text. |
errorText | No | string | Error message returned on failure. |
Example
luna-send -n 1 palm://com.palm.printmgr/jobs/setRenderStatus '{"jobID":"5","renderResultCode":-301, "renderResultText":"an Unknown error occurred"}'
Example Output
{ "returnValue":true }
Error Codes
Error Message Grouping
Errors are grouped in the following ranges. Note that these are not for end users, who should be given more specific and helpful error messages.
#define PM_ERR_USER_START = -200 // Range for User errors #define PM_ERR_USER_END = -299 // Range for User errors #define PM_ERR_REND_START = -300 // Range for Render errors #define PM_ERR_REND_END = -399 // Range for Render errors #define PM_ERR_COMM_START = -400 // Range for Comm errors #define PM_ERR_COMM_END = -499 // Range for Comm errors #define PM_ERR_INFO_START = -500 // Range for Info errors #define PM_ERR_INFO_END = -599 // Range for Info errors #define PM_ERR_PROG_START = -600 // Range for Programming errors #define PM_ERR_PROG_END = -699 // Range for Programming errors #define PM_ERR_SYST_START = -700 // Range for System errors #define PM_ERR_SYST_END = -799 // Range for System errors
User Error Messages
typedef enum { PM_ERR_PRINTER_ID_UNKNOWN = -202, // "user: unknown printer ID" PM_ERR_PRINTER_IP_NOT_VALID = -206, // "user: not a valid IP address" PM_ERR_PRINTER_DUPLICATE_IP = -205, // "user: printer address already exists" PM_ERR_PRINTER_DUPLICATE_IP_ZERO = -245, // "user: printer address already exists (zeroconf added)" PM_ERR_PRINTER_DUPLICATE_ID = -204, // "user: printer ID already exists" PM_ERR_PRINTER_NOT_SUPPORTED = -238, // "user: printer is not supported (no pcl3gui or pcl5)" PM_ERR_PRINTER_NO_RESPONSE_MANUAL = -203, // "user: no reponse from manually added printer (IP valid, may be incorrect or printer not there)" PM_ERR_JOB_NO_JOB_HANDLES = -243, // "recoverable: no job handles" PM_ERR_JOB_TEMP_FILE_NO_ROOM = -233, // "recoverable: not enough room in file cache for temp file" PM_ERR_JOB_UNKNOWN_ERROR = -299, // "unknown: unknown job error" PM_ERR_JOB_NO_COMM = -401, // "communication: could not communicate with printer" PM_ERR_PRINTER_GET_CAPS = -402, // "communication: failed to get printer capabilities" PM_ERR_PRINTER_NO_RESPONSE = -403, // "communication: no reponse from printer" PM_ERR_JOB_ADDRESS_NOT_VALID = -404, // "communication: printer address no longer valid can't access" PM_ERR_PRINTER_GET_CAPS_PING_FAIL = -405, // "communication: no response to ping before getting printer capabilities" PM_ERR_PRINTER_UNKNOWN_ADDRESS = -406, // "communication: printer address is unknown" PM_ERR_JOB_CLOSED = -501, // "info: action invalid, job already closed" PM_ERR_JOB_CANCEL_REQUESTED = -502, // "info: cancel requested for job." PM_ERR_PRINTER_SET_CURRENT = -503, // "info: set currentPrinter failed" PM_ERR_JOB_NO_0_FILE = -601, // "programming: 0 length file" PM_ERR_JOB_CANT_SET_INSET = -602, // "programming: can't set insets with borderless" PM_ERR_JOB_EMPTY_FILE_EXT = -603, // "programming: empty file extension" PM_ERR_JOB_NO_FILE = -604, // "programming: file does not exist" PM_ERR_JOB_BAD_PARAM_COLOR = -605, // "programming: incorrect color" PM_ERR_JOB_BAD_PARAM_DRYTIME = -606, // "programming: incorrect drytime" PM_ERR_JOB_BAD_PARAM_DUPLEX = -607, // "programming: incorrect duplex" PM_ERR_JOB_BAD_PARAM_SIZE = -608, // "programming: incorrect mediaSize" PM_ERR_JOB_BAD_PARAM_TYPE = -609, // "programming: incorrect mediaType" PM_ERR_INCORRECT_SYNTAX = -610, // "programming: incorrect parameter syntax" PM_ERR_JOB_BAD_PARAM_PQ = -611, // "programming: incorrect printQuality" PM_ERR_JOB_BAD_PARAM_TRAY = -612, // "programming: incorrect tray" PM_ERR_JOB_INSET_OUTSIDE_PRINTABLE = -613, // "programming: inset outside printable area" PM_ERR_JOB_NO_FILES_TO_PRINT = -614, // "programming: no files to print" PM_ERR_JOB_OUT_OF_ORDER = -615, // "programming: out of order currentpage" PM_ERR_JOB_TEMP_FILE_TOO_LARGE = -616, // "programming: temp file larger than specified" PM_ERR_JOB_ID_BAD = -617, // "programming: unknown job ID" PM_ERR_JOB_NO_MIME = -618, // "programming: unsupported or null mime type" PM_ERR_JOB_NO_PORT = -619, // "programming: unsupported port" PM_ERR_JOB_NO_JOB_FOR_FILE = -620, // "programming: file not found in any job" PM_ERR_FILE_CACHE_BAD_REPLY = -701, // "system: bad reply from file cache" PM_ERR_PRINTER_DB_ACCESS = -702, // "system: can't access AddPrinter Database" PM_ERR_JOB_ADD_PAGE_FAILED = -703, // "system: could not add page" PM_ERR_JOB_FINAL_PARAMS_FAILED = -704, // "system: could not get final job params" PM_ERR_FILE_CACHE_PATH = -705, // "system: no path to file cache" PM_ERR_JOB_NO_PLUGIN = -706, // "system: no suitable plugin" PM_ERR_JOB_SUBS_SET_CANCEL_FAILED = -707, // "system: subscription set cancel failed" PM_ERR_JOB_ADD_JOB_FAILED = -708, // "system: unable to add job" PM_ERR_JOB_CANCEL_FAILED = -709, // "system: unable to cancel" PM_ERR_JOB_CANT_FLAG_LAST_PAGE = -710, // "system: unable to flag last page" PM_ERR_JOB_START_FAILED = -711, // "system: unable to start job" }