TFORMer SDK - NET
8
|
This is the main class of TFORMer SDK for generating output. More...
Public Member Functions | |
Job () | |
Job class constructor. | |
delegate void | CloseStreamDelegate (Stream stream) |
Delegate used by PrintToStreams to close a stream. | |
delegate Stream | CreateStreamDelegate (string sStreamObjName) |
Delegate used by PrintToStreams to create a new output stream. | |
void | Dispose () |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. | |
string | GetPrintResult (DataFormat dataFormat) |
Gets the data of the last print operation in specified format. | |
void | Print () |
Prints the Job using the selected FormLayout and the current JobData. | |
void | PrintToStream (Stream stream) |
Print the current Job using the selected FormLayout and current JobData. | |
void | PrintToStreams (CreateStreamDelegate fnCreate, CloseStreamDelegate fnClose) |
Print the current Job using the selected FormLayout and current JobData. | |
virtual void | SaveXml (string filename) |
Saves the JobData used for printing a Job as XML file. | |
Properties | |
string | ConfigFile [get, set] |
Gets/Sets the current configuration file for TFORMer SDK. | |
string | FormName [get, set] |
Gets/Sets the name of the Repository-based FormLayout for this Job. | |
int | FromPage [get, set] |
Gets/Sets the first page-number to be printed. | |
JobData | JobData [get, set] |
Gets/Sets the JobData for the Job. | |
string | JobTrayControlName [get, set] |
Gets/Sets the name of the JobTrayControl to be used for this Job. | |
int | NumberOfCopies [get, set] |
Gets/Sets the number of copies to be printed. | |
String | Options [get, set] |
Gets/Sets additional options for printing and output creation. | |
string | OutputName [get, set] |
Gets/Sets the name of the output file or the name of the spool-job (on Microsoft Windows printers). | |
string | PrinterName [get, set] |
Gets/Sets the name of the output device (file or printer) and the type of the printer (e.g. | |
PrinterType | PrinterType [get, set] |
Gets/Sets the type of the generated output. | |
PrintResultType | PrintResultType [get, set] |
Gets/Sets the type of data that should be gathered, while printing. | |
string | ProjectName [get, set] |
Gets/Sets the name of the Project for printing a Repository-based FormLayout. | |
string | RepositoryName [get, set] |
Gets/Sets the filename of the Repository or the filename of the stand-alone FormLayout for this Job. | |
int | StartColumn [get, set] |
Gets/Sets the column-number of the first label to be printed. | |
int | StartRow [get, set] |
Gets/Sets the row-number of the first label to be printed. | |
int | ToPage [get, set] |
Gets/Sets the last page number to be printed. |
This is the main class of TFORMer SDK for generating output.
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
The basic steps to generate output are as follows:
delegate void CloseStreamDelegate | ( | Stream | stream | ) |
Delegate used by PrintToStreams to close a stream.
This delegate is called when the current stream should be closed. The delegate will only be triggered while inside PrintToStreams.
stream | Stream to be closed |
delegate Stream CreateStreamDelegate | ( | string | sStreamObjName | ) |
Delegate used by PrintToStreams to create a new output stream.
This delegate is called when a new stream should be created. The delegate will only be triggered while inside PrintToStreams. If the output format needs several streams (e.g. multi-page BMP output), this event will be triggered for each single stream (in this case for each page).
sStreamObjName | Name of the stream, the name of the stream contains information about out type, output file name (in case of a file stream) and the stream counter |
void Dispose | ( | ) |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
string GetPrintResult | ( | DataFormat | dataFormat | ) |
Gets the data of the last print operation in specified format.
Call this function after Print or PrintToStreams to get the data that has been gathered while printing. Specify the data to be gathered by a call to PrintResultType before Print or PrintToStreams.
dataFormat | Flags for format of generated data. |
void Print | ( | ) |
Prints the Job using the selected FormLayout and the current JobData.
void PrintToStream | ( | Stream | stream | ) |
Print the current Job using the selected FormLayout and current JobData.
The output is available in the provided output stream.
stream | Output stream |
void PrintToStreams | ( | CreateStreamDelegate | fnCreate, |
CloseStreamDelegate | fnClose | ||
) |
Print the current Job using the selected FormLayout and current JobData.
The output is provided via multiple output streams created and closed by the provided delegates.
fnCreate | Delegate function to create a new stream |
fnClose | Delegate function to close a stream |
virtual void SaveXml | ( | string | filename | ) | [virtual] |
string ConfigFile [get, set] |
Gets/Sets the current configuration file for TFORMer SDK.
string FormName [get, set] |
Gets/Sets the name of the Repository-based FormLayout for this Job.
Specifies the name of the FormLayout which is referenced from within a Project of the current Repository.
int FromPage [get, set] |
Gets/Sets the first page-number to be printed.
Specifies the page number of the first page to be printed. To restore this setting (printing of all pages of the job), execute the following:
job.FromPage = 0; job.ToPage = 0;
Gets/Sets the JobData for the Job.
JobData is used to provide DataField values for printing the FormLayout. Different methods for providing JobData are available (see JobData, JobDataCsv, JobDataXml, JobDataOdbc, JobDataDataSource, JobDataRecordSet).
string JobTrayControlName [get, set] |
Gets/Sets the name of the JobTrayControl to be used for this Job.
Specify the JobTrayControl for the current Job. If this property is not set then the Job is generated with the JobTrayControl named _Default_
.
int NumberOfCopies [get, set] |
Gets/Sets the number of copies to be printed.
Specifies the number of identical copies produced with one call to Print. The default value is 1.
String Options [get, set] |
Gets/Sets additional options for printing and output creation.
[OptionName]=[value]
.[OptionName]
without an additional value is treated as if [OptionName]=true
is provided.no[OptionName]
is treated as if [OptionName]=false
is providedstring OutputName [get, set] |
Gets/Sets the name of the output file or the name of the spool-job (on Microsoft Windows printers).
Use OutputName in conjunction with PrinterType to specify the type and the target of the generated output. PrinterName overrides the settings of OutputName and PrinterType. Refer to Output Format Prefixes for a description of the supported output formats.
string PrinterName [get, set] |
Gets/Sets the name of the output device (file or printer) and the type of the printer (e.g.
normal printer, PDF, JPG,....).
The function specifies the output format as well as the target device or target filename. Refer to Output Format Prefixes for a description of the supported output formats.
PrinterType PrinterType [get, set] |
Gets/Sets the type of the generated output.
Use OutputName in conjunction with PrinterType to specify the type and the target of the generated output. PrinterName overrides the settings of OutputName and PrinterType. Refer to Output Format Prefixes for a description of the supported output formats.
PrintResultType PrintResultType [get, set] |
Gets/Sets the type of data that should be gathered, while printing.
Call this function before Print or PrintToStreams to specify the data that should be gathered while printing. After the output has been generated the data can retrieved by a call to GetPrintResult.
string ProjectName [get, set] |
Gets/Sets the name of the Project for printing a Repository-based FormLayout.
When using a Repository-based FormLayout use this function to provide the name of the Project. In addition, the name of the FormLayout must be set with Job.FormName.
string RepositoryName [get, set] |
Gets/Sets the filename of the Repository or the filename of the stand-alone FormLayout for this Job.
Use this method to provide either the filename of the Repository (*.tfr
file) or the stand-alone FormLayout (*.tff
file). If you are using a Repository you need to specify the Project (Job.ProjectName) and the FormLayout (Job.FormName) as well.
int StartColumn [get, set] |
Gets/Sets the column-number of the first label to be printed.
Usually TFORMer prints the first label of a label-style report at the first available position of a page (this is the top / left label). This property sets the column number of the first label, the default starting column is 0. To restore the default behavior do the following:
job.StartRow = 0; job.StartColumn = 0;
0
) int StartRow [get, set] |
Gets/Sets the row-number of the first label to be printed.
Usually TFORMer prints the first label of a label-style report at the first available position of a page (this is the top / left label). This property sets the row number of the first label, the default starting row is 0.
0
)© 2006-2024 - all rights reserved by TEC-IT Datenverarbeitung GmbH | |
Generated on Wed Aug 7 2024 17:29:42 for TFORMer SDK - NET with doxygen 1.7.6.1 |