Job class

Package: com.tecit.TFORMer.Printing

This is the main class of TFORMer SDK for generating output.

Usage and notes

Overview

Printing (or more general: producing output) is done with the help of a so-called Job. A Job prints a stand-alone or Repository based FormLayout with dynamic data provided by JobData.

A Job provides various methods for controlling the output behavior. Among other functions it is possible

Workflow

The basic steps to generate output are as follows:

  1. Select a FormLayout

  2. Create JobData

    JobData is used to pass dynamic data to a Job.

  3. Provide data for JobData
    The JobData is use to provide values for the DataFields required for the FormLayout to be printed.
    Provide data programmatically or instruct JobData to use a DataSource already defined in the FormLayout (e.g. importing data from a CSV file or a ODBC database). See JobDataRecordSet, JobDataCsv, JobDataOdbc, JobDataXml, JobDataDataSource

  4. Create a Job

    The Job class is the main class for printing a FormLayout.

  5. Assign the JobData to the Job
    If no JobData is assigned to a new Job, TFORMer SDK uses the DataSource selected in the FormLayout. If no source is selected, or the special _Default_ source is selected, it uses the saved data in the layout's companion .xml file. See JobDataDataSource.

  6. Adjust the properties of the Job
    The most important properties are the output-type and the name of the target device (setOutputName, setPrinterType or setPrinterName).
    The order in which the properties are set is irrelevant.

  7. Print the Job
    To generate the Job based on the FormLayout and JobData in the required output format use one of the print-methods (print, printToStream, printToStreams) provided by a Job.

More Information

Note

Thread-safety: A single instance of this class must not be used by different threads.

Constructors

MemberDescription
Job()

Job class constructor.

Methods

MemberDescription
dispose()Returns: void

Releases the resources allocated by this instance.

getConfigurationFile()Returns: String

Gets the current configuration file for TFORMer SDK.

getFormName()Returns: String

Gets the name of the Repository-based FormLayout for this Job.

getFromPage()Returns: int

Gets the first page-number to be printed.

getJobData()Returns: JobData

Gets the JobData for the Job.

getJobTrayControlName()Returns: String

Gets the name of the JobTrayControl to be used for this Job.

getNumberOfCopies()Returns: int

Gets the number of copies to be printed.

getOptions()Returns: String

Return the additional options for printing and output creation.

getOutputName()Returns: String

Gets the name of the output file or the name of the spool-job (on Microsoft Windows printers).

getPrinterName()Returns: String

Gets the type and the name of the output device.

getPrinterType()Returns: EPrinterType

Gets the type of the generated output.

getPrintResult(DataFormat)Returns: String

Gets the data of the last print operation in specified format.

getPrintResultType()Returns: PrintResultType

Gets the type of data that should be gathered, while printing.

getProjectName()Returns: String

Gets the name of the Project for printing a Repository-based FormLayout.

getRepositoryName()Returns: String

Gets the filename of the Repository or the filename of the stand-alone FormLayout for this Job.

getStartColumn()Returns: int
getStartRow()Returns: int

Gets the row-number of the first label to be printed.

getToPage()Returns: int

Gets the last page-number to be printed.

print()Returns: void

Prints the Job using the selected FormLayout and the current JobData.

printToStream(OutputStream)Returns: void

Print the current Job using the selected FormLayout and current JobData.

printToStreams(OutputStreamFactory)Returns: void

Print the current Job using the selected FormLayout and current JobData.

saveXml(String)Returns: void

Saves the JobData used for printing a Job as XML file.

setConfigurationFile(String)Returns: void

Sets the current configuration file for TFORMer SDK.

setFormName(String)Returns: void

Sets the name of the Repository-based FormLayout for this Job.

setFromPage(int)Returns: void

Sets the first page-number to be printed.

setJobData(JobData)Returns: void

Sets the JobData for the Job.

setJobTrayControlName(String)Returns: void

Sets the name of the JobTrayControl to be used for this Job.

setNumberOfCopies(int)Returns: void

Sets the number of copies to be printed.

setOptions(String)Returns: void

Sets additional options for printing and output creation.

setOutputName(String)Returns: void

Sets the name of the output file or the name of the spool-job (on Microsoft Windows printers).

setPrinterName(String)Returns: void

Sets the name of the output device (file or printer).

setPrinterType(EPrinterType)Returns: void

Sets the type of the generated output.

setPrintResultType(PrintResultType)Returns: void

Sets the type of data that should be gathered, while printing.

setProjectName(String)Returns: void

Sets the name of the Project for printing a Repository-based FormLayout.

setRepositoryName(String)Returns: void

Sets the filename of the Repository or the filename of the stand-alone FormLayout for this Job.

setStartColumn(int)Returns: void

Sets the column-number of the first label to be printed.

setStartRow(int)Returns: void

Sets the row-number of the first label to be printed.

setToPage(int)Returns: void

Sets the last page number to be printed.

Search documentation

Search in
More scopes
Additional scopes

All contents