Search

User Manual

GETTING STARTED


MODULES AND PLATFORM


APPENDIX


TUTORIALS & HELPFUL TRICKS


GLOSSARY


STRATEGIC PARTNER LINKS

Sepasoft - MES Modules
Cirrus Link - MQTT Modules

RESOURCES

Inductive University
Ignition Demo Project
Knowledge Base Articles
Forum
IA Support
SDK Documentation
SDK Examples

ALL MANUAL VERSIONS

Ignition 8.1
Ignition 7.9
Ignition 7.8

Deprecated Pages

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

This function is used in Python Scripting.

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:

PropertyDescription

Show Print Dialog

If true (1), then the print dialog window will be shown before printing. This allows users to specify printing options like orientation, printer, paper size, margins, etc. [default: 1]

Fit To Page

If the component is too big or small to fit on a page, it will be proportionately zoomed out or in until it fits into the page. [default: 1]

Zoom Factor

If greater than zero, this zoom factor will be used to zoom the printed image in or out. For example, if this is 0.5, the printed image will be half size. If used, this zoom factor overrides the Fit To Page parameter. [default: -1.0]

Orientation

The orientation that the page will be printing at. 1 for Portrait, 0 for Landscape. [default: 1]

Page Width

The width of the paper in inches. [default: 8.5]

Page Height

The height of the paper in inches. [default: 11]

Left Margin, Right Margin, Top Margin, Bottom Margin

The margins, specified in inches. [default: 0.75]

Printer NameThe name of the printer that this will default print to, if available.

The properties of the PrintJob object can be altered before printing the document.

PropertyRetrieve the value with...Set the value with...
Show Print Dialog.isShowPrintDialog().setShowPrintDialog(boolean)
Fit To Page.isFitToPage().setFitToPage(boolean)
Zoom Factor.getZoomFactor().setZoomFactor(double)
Orientation.getOrientaion().setOrientation(int)
Page Width.getPageWidth().setPageWidth(float)
Page Height.getPageHeight().setPageHeight(float)
Left Margin.getLeftMargin.setLeftMargin(float)
Right Margin.getRightMargin().setRightMargin(float)
Top Margin.getTopMargin().setTopMargin(float)
Bottom Margin.getBottomMargin().setBottomMargin(float)
Printer Name.getPrinterName().setPrinterName(string)

All Margins*

-.setMargins(float)

*All Margins isn't a property of the PrintJob, but rather all four of the PrintJob's Margins can be set at the same time using that function.

Client Permission Restrictions

This scripting function has no Client Permission restrictions.

Syntax

system.net. httpClient()

  • Parameters

Component  component  - The component that you'd like to print.

  • Returns

JythonPrintJob  -  A print job that can then be customized and started. To start the print job, use .print().

  • Scope

Vision Client

Code Examples
Code Snippet
 
Code Snippet
 
  • No labels