Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

CUPSMBS.CancelJob(name as string, job as Int32)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CUPS MBS Tools Plugin 9.7 Yes No Yes Yes No
Function: Cancel a print job on the default server.
Notes:
name: Name of printer or class
job: Job ID, kJobIDCurrent for the current job, or kJobIDAll for all jobs

Pass kJobIDAll to cancel all jobs or kJobIDCurrent to cancel the current job on the named destination.

Raises exception on error.

Feedback, Comments & Corrections

CUPSMBS.GetDefault as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CUPS MBS Tools Plugin 9.7 Yes No Yes Yes No
Function: Get the default printer or class for the default server.
Example:
MsgBox CUPSMBS.GetDefault

Feedback, Comments & Corrections

CUPSMBS.GetDestinations as CUPSDestinationMBS()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CUPS MBS Tools Plugin 9.7 Yes No Yes Yes No
Function: Get the list of destinations from the default server.
Example:
dim lines(-1) as string
for each c as CUPSDestinationMBS in CUPSMBS.GetDestinations
lines.append c.Name
next

MsgBox Join(lines,EndOfLine)
Notes: Starting with CUPS 1.2, the returned list of destinations include the printer-info, printer-is-accepting-jobs, printer-is-shared, printer-make-and-model, printer-state, printer-state-change-time, printer-state-reasons, and printer-type attributes as options. CUPS 1.4 adds the marker-change-time, marker-colors, marker-high-levels, marker-levels, marker-low-levels, marker-message, marker-names, marker-types, and printer-commands attributes as well.

Feedback, Comments & Corrections

CUPSMBS.GetJobs(name as string, OnlyMyJobs as boolean, whichjobs as Integer) as CUPSJobMBS()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CUPS MBS Tools Plugin 9.7 Yes No Yes Yes No
Function: Get the jobs from the default server.
Notes:
name: "" = all destinations, otherwise show jobs for named destination
OnlyMyJobs: false = all users, true = mine
whichjobs: kWhichJobsAll, kWhichJobsActive, or kWhichJobsComplete

A "whichjobs" value of kWhichJobsAll returns all jobs regardless of state, while kWhichJobsActive returns jobs that are pending, processing, or held and kWhichJobsComplete returns jobs that are stopped, canceled, aborted, or completed.

Feedback, Comments & Corrections

CUPSMBS.GetPassword(prompt as string) as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CUPS MBS Tools Plugin 9.7 Yes No Yes Yes No
Function: Get a password from the user.
Notes: Returns "" if the user does not provide a password.

Feedback, Comments & Corrections

CUPSMBS.GetPPD(name as string) as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CUPS MBS Tools Plugin 9.7 Yes No Yes Yes No
Function: Get the PPD file for a printer on the default server.
Example:
for each c as CUPSDestinationMBS in CUPSMBS.GetDestinations
if c.isDefault then
MsgBox cupsmbs.GetPPD(c.Name)
end if
next
Notes:
Returns Filename for PPD file.

For classes, cupsGetPPD returns the PPD file for the first printer in the class.

The returned filename is stored in a static buffer and is overwritten with each call to cupsGetPPD or cupsGetPPD2. The caller "owns" the file that is created and must unlink the returned filename.

Feedback, Comments & Corrections

CUPSMBS.LastError as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CUPS MBS Tools Plugin 9.7 Yes No Yes Yes No
Function: Return the last IPP status code.

Feedback, Comments & Corrections

CUPSMBS.LastErrorString as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CUPS MBS Tools Plugin 9.7 Yes No Yes Yes No
Function: Return the last IPP status-message.
Example:
MsgBox CUPSMBS.LastErrorString
Notes: Returns status-message text from last request.

Feedback, Comments & Corrections

CUPSMBS.PrintData(name as string, Data as String, Title as string) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CUPS MBS Tools Plugin 16.5 Yes No Yes Yes No
Function: Print a file to a printer or class on the default server.
Notes:
Name: Destination name
Data: Data to print
Title: Title of job

Returns Job ID or 0 on error

Feedback, Comments & Corrections

CUPSMBS.PrintFile(name as string, file as folderitem, title as string) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CUPS MBS Tools Plugin 9.7 Yes No Yes Yes No
Function: Print a file to a printer or class on the default server.
Example:
// Print file on default printer...
dim f as FolderItem = SpecialFolder.Desktop.Child("test.ps")

for each c as CUPSDestinationMBS in CUPSMBS.GetDestinations
if c.isDefault then

call CUPSMBS.PrintFile(c.Name, f, f.Name)

end if
next
Notes:
name: Destination name
filename: File to print
title: Title of job

Returns Job ID or 0 on error

See also:

Feedback, Comments & Corrections

CUPSMBS.PrintFile(name as string, file as folderitem, title as string, options() as CUPSOptionMBS) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CUPS MBS Tools Plugin 9.7 Yes No Yes Yes No
Function: Print a file to a printer or class on the default server.
Notes:
name: Destination name
filename: File to print
title: Title of job
options: Options

Returns Job ID or 0 on error

See also:

Feedback, Comments & Corrections

CUPSMBS.PrintFiles(name as string, files() as folderitem, title as string) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CUPS MBS Tools Plugin 9.7 Yes No Yes Yes No
Function: Print files to a printer or class on the default server.
Notes:
name: Destination name
filename: Files to print
title: Title of job

Returns Job ID or 0 on error

See also:

Feedback, Comments & Corrections

CUPSMBS.PrintFiles(name as string, files() as folderitem, title as string, options() as CUPSOptionMBS) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CUPS MBS Tools Plugin 9.7 Yes No Yes Yes No
Function: Print files to a printer or class on the default server.
Notes:
name: Destination name
files: Files to print
title: Title of job
options: Options

Returns Job ID or 0 on error

See also:

Feedback, Comments & Corrections

CUPSMBS.Server as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CUPS MBS Tools Plugin 9.7 Yes No Yes Yes No
Function: Return the hostname/address of the default server.
Example:
MsgBox CUPSMBS.Server
Notes: The returned value can be a fully-qualified hostname, a numeric IPv4 or IPv6 address, or a domain socket pathname.

Feedback, Comments & Corrections

CUPSMBS.SetDefaultPrinter(printer as string)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CUPS MBS Tools Plugin 12.5 Yes No Yes Yes No
Function: Sets the default printer.
Notes: Name must be one of CUPSDestinationMBS's name.

Feedback, Comments & Corrections

CUPSMBS.SetServer(server as string)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CUPS MBS Tools Plugin 9.7 Yes No Yes Yes No
Function: Set the default server name.
Notes:
server:Server name

The "server" string can be a fully-qualified hostname, a numeric IPv4 or IPv6 address, or a domain socket pathname. Pass "" to restore the default server name.

Feedback, Comments & Corrections

CUPSMBS.SetUser(user as string)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CUPS MBS Tools Plugin 9.7 Yes No Yes Yes No
Function: Set the default user name.
Notes:
user: User name

Pass "" to restore the default user name.

Feedback, Comments & Corrections

CUPSMBS.User as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method CUPS MBS Tools Plugin 9.7 Yes No Yes Yes No
Function: Return the current user's name.
Example:
MsgBox CUPSMBS.User

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS Tools Plugin.




Links
MBS Xojo Chart Plugins