Job class

Namespace: TECIT.TFORMer

Usage and notes

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

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
    Supply values for the data fields used by the selected form layout:

  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 (OutputName, PrinterType or PrinterName).
    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.

Base types: IDisposable

Constructors

MemberDescription
Job()

Job class constructor.

Properties

MemberDescription
ConfigFilestring { get; set; }

Gets/Sets the current configuration file for TFORMer SDK.

FormNamestring { get; set; }

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

FromPageint { get; set; }

Gets/Sets the first page-number to be printed.

JobDataJobData { get; set; }

Gets/Sets the JobData for the Job.

JobTrayControlNamestring { get; set; }

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

NumberOfCopiesint { get; set; }

Gets/Sets the number of copies to be printed.

OptionsString { get; set; }

Gets/Sets additional options for printing and output creation.

OutputNamestring { get; set; }

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

PrinterNamestring { get; set; }

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

PrinterTypePrinterType { get; set; }

Gets/Sets the type of the generated output.

PrintResultTypePrintResultType { get; set; }

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

ProjectNamestring { get; set; }

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

RepositoryNamestring { get; set; }

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

StartColumnint { get; set; }

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

StartRowint { get; set; }

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

ToPageint { get; set; }

Gets/Sets the last page number to be printed.

Methods

MemberDescription
Dispose()Returns: void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

GetPrintResult(DataFormat)Returns: string

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

Print()Returns: void

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

PrintToStream(Stream)Returns: void

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

PrintToStreams(CreateStreamDelegate, CloseStreamDelegate)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.

Delegates

MemberDescription
CloseStreamDelegate(Stream)delegate void

Delegate used by PrintToStreams to close a stream.

CreateStreamDelegate(string)delegate Stream

Delegate used by PrintToStreams to create a new output stream.

Search documentation

Search in
More scopes
Additional scopes

All contents