Top | Previous | Next |
system.print.createPrintJob |
Description Provides a general printing facility for printing the contents of a window or component to a printer. The general workflow for this function is that you create the print job, set the options you'd like on it, and then call print() on the job.
For printing reports or tables, use those components' dedicated print() functions.
The PrintJob object that this function returns has the following properties that can be set:
You can set all of the margins at once with job.setMargins(number), and you initiate the printing with job.print(). Syntax system.print.createPrintJob(component) Parameters Component component - The component that you'd like to print. Returns JythonPrintJob - A print job that can then be customized and started. Scope Client Examples Put this code on a button to print out an image of the container the button is in
job = system.print.createPrintJob(event.source.parent) job.setMargins(0.5) job.zoomFactor = 0.75 job.showPageFormat = 0 job.print() |