Platforms to show: All Mac Windows Linux Cross-Platform
Back to WindowsAddPrintJobMBS class.
WindowsAddPrintJobMBS.AddJob as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Printing | MBS Win Plugin | 6.1 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Returns true on success and false on failure.
Some examples using this method:
WindowsAddPrintJobMBS.ClosePrinter
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Printing | MBS Win Plugin | 16.4 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
WindowsAddPrintJobMBS.EndDocPrinter as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Printing | MBS Win Plugin | 10.3 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
If the function succeeds, the return value is a true.
The EndDocPrinter function returns an error if the print job was not started by calling the StartDocPrinter function.
The sequence for a print job is as follows:
1. To begin a print job, call StartDocPrinter.
2. To begin each page, call StartPagePrinter.
3. To write data to a page, call WritePrinter.
4. To end each page, call EndPagePrinter.
5. Repeat 2, 3, and 4 for as many pages as necessary.
6. To end the print job, call EndDocPrinter.
When a page in a spooled file exceeds approximately 350 MB, it may fail to print and not send an error message. For example, this can occur when printing large EMF files. The page size limit depends on many factors including the amount of virtual memory available, the amount of memory allocated by calling processes, and the amount of fragmentation in the process heap.
Some examples using this method:
WindowsAddPrintJobMBS.EndPagePrinter as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Printing | MBS Win Plugin | 10.3 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
If the function succeeds, the return value is a true.
The sequence for a print job is as follows:
1. To begin a print job, call StartDocPrinter.
2. To begin each page, call StartPagePrinter.
3. To write data to a page, call WritePrinter.
4. To end each page, call EndPagePrinter.
5. Repeat 2, 3, and 4 for as many pages as necessary.
6. To end the print job, call EndDocPrinter.
When a page in a spooled file exceeds approximately 350 MB, it can fail to print and not send an error message. For example, this can occur when printing large EMF files. The page size limit depends on many factors including the amount of virtual memory available, the amount of memory allocated by calling processes, and the amount of fragmentation in the process heap.
Some examples using this method:
WindowsAddPrintJobMBS.OpenPrinter(PrinterName as string) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Printing | MBS Win Plugin | 6.1 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Returns true on success and false on failure.
PrinterName can be "" for the default printer.
WindowsAddPrintJobMBS.ScheduleJob as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Printing | MBS Win Plugin | 6.1 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Returns true on success and false on failure.
Some examples using this method:
WindowsAddPrintJobMBS.StartDocPrinter(DocName as string, Datatype as string) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Printing | MBS Win Plugin | 10.3 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
DocName: A string that specifies the name of the document.
OutputFile: Optional a path string or a folderitem that specifies the name of an output file. To print to a printer, set this to "" or nil or leave away.
Datatype: A string that identifies the type of data used to record the document.
If the function succeeds, the return value is true and the JobID property is set.
The sequence for a print job is as follows:
1. To begin a print job, call StartDocPrinter.
2. To begin each page, call StartPagePrinter.
3. To write data to a page, call WritePrinter.
4. To end each page, call EndPagePrinter.
5. Repeat 2, 3, and 4 for as many pages as necessary.
6. To end the print job, call EndDocPrinter.
When a page in a spooled file exceeds approximately 350 MB, it can fail to print and not send an error message. For example, this can occur when printing large EMF files. The page size limit depends on many factors including the amount of virtual memory available, the amount of memory allocated by calling processes, and the amount of fragmentation in the process heap.
See also:
- StartDocPrinter(DocName as string, OutputFile as folderitem, Datatype as string) as boolean
- StartDocPrinter(DocName as string, OutputFilePath as string, Datatype as string) as boolean
Some examples using this method:
WindowsAddPrintJobMBS.StartDocPrinter(DocName as string, OutputFile as folderitem, Datatype as string) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Printing | MBS Win Plugin | 10.3 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
DocName: A string that specifies the name of the document.
OutputFile: Optional a path string or a folderitem that specifies the name of an output file. To print to a printer, set this to "" or nil or leave away.
Datatype: A string that identifies the type of data used to record the document.
If the function succeeds, the return value is true and the JobID property is set.
The sequence for a print job is as follows:
1. To begin a print job, call StartDocPrinter.
2. To begin each page, call StartPagePrinter.
3. To write data to a page, call WritePrinter.
4. To end each page, call EndPagePrinter.
5. Repeat 2, 3, and 4 for as many pages as necessary.
6. To end the print job, call EndDocPrinter.
When a page in a spooled file exceeds approximately 350 MB, it can fail to print and not send an error message. For example, this can occur when printing large EMF files. The page size limit depends on many factors including the amount of virtual memory available, the amount of memory allocated by calling processes, and the amount of fragmentation in the process heap.
See also:
WindowsAddPrintJobMBS.StartDocPrinter(DocName as string, OutputFilePath as string, Datatype as string) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Printing | MBS Win Plugin | 10.3 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
DocName: A string that specifies the name of the document.
OutputFile: Optional a path string or a folderitem that specifies the name of an output file. To print to a printer, set this to "" or nil or leave away.
Datatype: A string that identifies the type of data used to record the document.
If the function succeeds, the return value is true and the JobID property is set.
The sequence for a print job is as follows:
1. To begin a print job, call StartDocPrinter.
2. To begin each page, call StartPagePrinter.
3. To write data to a page, call WritePrinter.
4. To end each page, call EndPagePrinter.
5. Repeat 2, 3, and 4 for as many pages as necessary.
6. To end the print job, call EndDocPrinter.
When a page in a spooled file exceeds approximately 350 MB, it can fail to print and not send an error message. For example, this can occur when printing large EMF files. The page size limit depends on many factors including the amount of virtual memory available, the amount of memory allocated by calling processes, and the amount of fragmentation in the process heap.
See also:
WindowsAddPrintJobMBS.StartPagePrinter as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Printing | MBS Win Plugin | 10.3 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
If the function succeeds, the return value is a true.
The sequence for a print job is as follows:
1. To begin a print job, call StartDocPrinter.
2. To begin each page, call StartPagePrinter.
3. To write data to a page, call WritePrinter.
4. To end each page, call EndPagePrinter.
5. Repeat 2, 3, and 4 for as many pages as necessary.
6. To end the print job, call EndDocPrinter.
When a page in a spooled file exceeds approximately 350 MB, it can fail to print and not send an error message. For example, this can occur when printing large EMF files. The page size limit depends on many factors including the amount of virtual memory available, the amount of memory allocated by calling processes, and the amount of fragmentation in the process heap.
Some examples using this method:
WindowsAddPrintJobMBS.WriteJob(data as string) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Printing | MBS Win Plugin | 6.1 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
You need to pass raw data for the printer, e.g. postscript data.
Returns the number of bytes written.
So lenb(data) should be equal to the result.
Only available between a call to AddJob and ScheduleJob.
Some examples using this method:
WindowsAddPrintJobMBS.WritePrinter(data as string) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Printing | MBS Win Plugin | 10.3 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
data: The data that should be written to the printer.
If the function succeeds, the return value is a true.
The sequence for a print job is as follows:
1. To begin a print job, call StartDocPrinter.
2. To begin each page, call StartPagePrinter.
3. To write data to a page, call WritePrinter.
4. To end each page, call EndPagePrinter.
5. Repeat 2, 3, and 4 for as many pages as necessary.
6. To end the print job, call EndDocPrinter.
When a high-level document (such as an Adobe PDF or Microsoft Word file) or other printer data (such PCL, PS, or HPGL) is sent directly to a printer, the print settings defined in the document take precedent over Windows print settings.
When a page in a spooled file exceeds approximately 350 MB, it can fail to print and not send an error message. For example, this can occur when printing large EMF files. The page size limit depends on many factors including the amount of virtual memory available, the amount of memory allocated by calling processes, and the amount of fragmentation in the process heap.
Some examples using this method:
The items on this page are in the following plugins: MBS Win Plugin.