#include <mlabScriptWrappers.h>
Inherits QObject.
MLABPrinter object available via MLAB.
The MLABPrinter object can be used to print either to a printer or a PDF document:
html = "<b>test</b>"
p.setOutputFileName(filename)
p.printHtml(html)
void setOutputFormat(const QString &format)
Sets the output format (may be "PDF" or "NATIVE").
Access to all global functions and objects of MLAB.
Definition mlabGlobalScriptAccess.h:79
MLABPrinter * newPrinter()
Creates a new process, see MLABPrinter class for its API.
void deletePrinter(MLABPrinter *process)
Deletes an MLABPrinter object.
See the TestPrinting module for getting a complete example.
◆ printHtml
void MLABPrinter::printHtml |
( |
const QString & | html, |
|
|
const QString & | localPath = QString() ) |
|
slot |
Prints the given rich text, localPath is used to resolve links to images.
◆ printTextDocument
void MLABPrinter::printTextDocument |
( |
QTextDocument * | document | ) |
|
|
slot |
Prints the given text document.
◆ setLandscapeOrientation
void MLABPrinter::setLandscapeOrientation |
( |
| ) |
|
|
slot |
Sets to landscape orientation.
◆ setOutputFileName
void MLABPrinter::setOutputFileName |
( |
const QString & | filename | ) |
|
|
slot |
Sets the filename to be written.
◆ setOutputFormat
void MLABPrinter::setOutputFormat |
( |
const QString & | format | ) |
|
|
slot |
Sets the output format (may be "PDF" or "NATIVE").
◆ setPageSize
void MLABPrinter::setPageSize |
( |
const QString & | paperSize | ) |
|
|
slot |
◆ setPortraitOrientation
void MLABPrinter::setPortraitOrientation |
( |
| ) |
|
|
slot |
Sets to portrait orientation.
◆ showPrintDialog
bool MLABPrinter::showPrintDialog |
( |
| ) |
|
|
slot |
Configures with print dialog, returns true if printing should be performed.