Platforms to show: All Mac Windows Linux Cross-Platform

Back to CPMPrintSessionMBS class.

CPMPrintSessionMBS.BeginDocument(settings as CPMPrintSettingsMBS, pageformat as CPMPageFormatMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Printing MBS MacCG Plugin 2.7 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Begins a new document with the given settings.

Lasterror is set.

CPMPrintSessionMBS.BeginDocumentNoDialog(settings as CPMPrintSettingsMBS, pageformat as CPMPageFormatMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Printing MBS MacCG Plugin 2.7 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Begins a new document with the given settings.

Doesn't use the print progress dialog.
Lasterror is set.

Some examples using this method:

CPMPrintSessionMBS.BeginPage(pageformat as CPMPageFormatMBS, rect as CPMRectMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Printing MBS MacCG Plugin 2.7 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Begins a new page.

Lasterror is set.

CPMPrintSessionMBS.BeginPageNoDialog(pageformat as CPMPageFormatMBS, rect as CPMRectMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Printing MBS MacCG Plugin 2.7 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Begins a new page.

Doesn't use the print progress dialog.
Lasterror is set.

Some examples using this method:

CPMPrintSessionMBS.Constructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Printing MBS MacCG Plugin 9.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Creates a new print session object.

CPMPrintSessionMBS.CreatePrinterList(list() as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Printing MBS MacCG Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Creates a list of all printers.
Example
dim session as CPMPrintSessionMBS = NewCPMPrintSessionMBS

dim list() as string
session.CreatePrinterList(list)

MsgBox join(list, EndOfLine)

List is an array of strings with the names of the printers.
Lasterror is set.

See also:

Some examples using this method:

CPMPrintSessionMBS.CreatePrinterList(list() as string, byref index as Integer, byref currentprinter as CPMPrinterMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Printing MBS MacCG Plugin 12.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Creates a list of all printers.
Example
dim session as CPMPrintSessionMBS = NewCPMPrintSessionMBS

dim list() as string
dim currentprinter as CPMPrinterMBS
dim index as Integer
session.CreatePrinterList(list, index, currentprinter)

MsgBox join(list, EndOfLine)

List is an array of strings with the names of the printers.
Index is the index of the current printer inside this list.
CurrentPrinter is the current printer selected.
Lasterror is set.

See also:

CPMPrintSessionMBS.CurrentPrinter as CPMPrinterMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Printing MBS MacCG Plugin 2.7 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The current printer for this session.

Lasterror is set.
Setting this can only be done on Mac OS X.
(Read and Write computed property)

CPMPrintSessionMBS.CurrentPrinterName as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Printing MBS MacCG Plugin 12.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The current printer for this session by name.

Lasterror is set.
(Read and Write computed property)

Some examples using this property:

CPMPrintSessionMBS.DefaultPageFormat(pageformat as CPMPageFormatMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Printing MBS MacCG Plugin 2.7 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Sets the page format object to the default settings.

Lasterror is set.

Some examples using this method:

CPMPrintSessionMBS.DefaultPrintSettings(printsettings as CPMPrintSettingsMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Printing MBS MacCG Plugin 2.7 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Sets the settings object to the default settings.

Lasterror is set.

Some examples using this method:

CPMPrintSessionMBS.EndDocument

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Printing MBS MacCG Plugin 2.7 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Ends the current document.

Lasterror is set.

CPMPrintSessionMBS.EndDocumentNoDialog

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Printing MBS MacCG Plugin 2.7 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Ends the current document.

Doesn't use the print progress dialog.
Lasterror is set.

Some examples using this method:

CPMPrintSessionMBS.EndPage

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Printing MBS MacCG Plugin 2.7 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Ends the current page.

Lasterror is set.

CPMPrintSessionMBS.EndPageNoDialog

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Printing MBS MacCG Plugin 2.7 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Ends the current page.

Doesn't use the print progress dialog.
Lasterror is set.

Some examples using this method:

CPMPrintSessionMBS.GetDestinationFormat(printsettings as CPMPrintSettingsMBS) as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Printing MBS MacCG Plugin 12.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the destination format value.

Lasterror is set.

CPMPrintSessionMBS.GetDestinationLocation(printsettings as CPMPrintSettingsMBS) as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Printing MBS MacCG Plugin 12.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the destination location value.

Lasterror is set.

CPMPrintSessionMBS.GetDestinationType(printsettings as CPMPrintSettingsMBS) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Printing MBS MacCG Plugin 2.7 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the destination type value.

Lasterror is set.

CPMPrintSessionMBS.PageContext as CGContextMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Printing MBS MacCG Plugin 2.7 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Creates a new CGContext object for the current page.

Lasterror is set.

Some examples using this method:

CPMPrintSessionMBS.PageSetupDialog(pageformat as CPMPageFormatMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Printing MBS MacCG Plugin 2.7 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Shows the page setup dialog.

Lasterror is set.

CPMPrintSessionMBS.PrintDialog(settings as CPMPrintSettingsMBS, pageformat as CPMPageFormatMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Printing MBS MacCG Plugin 2.7 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Shows the print dialog.

Lasterror is set.

CPMPrintSessionMBS.SetDestination(printsettings as CPMPrintSettingsMBS, desttype as Integer, destformat as String, desturl as String)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Printing MBS MacCG Plugin 12.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Sets a new destination.

Some destinations so you may need to specify a format, else you can pass "" for the default format. Some destinations require a URL to a file.

Destination type codes:
kPMDestinationInvalid0
kPMDestinationPrinter1
kPMDestinationFile2
kPMDestinationFax3
kPMDestinationPreview4

Destformat strings:
kPMDocumentFormatPDFapplication/pdf
kPMDocumentFormatPICTapplication/vnd.apple.printing-pict
kPMDocumentFormatPICTPSapplication/vnd.apple.printing-pict-ps
kPMDocumentFormatPostScriptapplication/postscript

Lasterror is set.

CPMPrintSessionMBS.UseSheets(docWindow as window)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Printing MBS MacCG Plugin 9.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Specifies that a printing dialog should be displayed as a sheet.

docWindow: The window to which the sheet dialog should be attached.
Lasterror is set. (-1 for the docWindow parameter being nil)

Some examples using this method:

CPMPrintSessionMBS.ValidatePageFormat(pageformat as CPMPageFormatMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Printing MBS MacCG Plugin 2.7 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Validates the page format.

Lasterror is set.

CPMPrintSessionMBS.ValidatePrintSettings(printsettings as CPMPrintSettingsMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Printing MBS MacCG Plugin 2.7 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Validates the print settings.

Lasterror is set.

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


The biggest plugin in space...