TFORMer SDK - JAVA
8
|
This is the main class of TFORMer SDK for generating output. More...
Public Member Functions | |
Job () throws TFormerException | |
Job class constructor. | |
void | dispose () throws TFormerException |
Releases the resources allocated by this instance. | |
void | print () throws TFormerException |
Prints the Job using the selected FormLayout and the current JobData. | |
void | printToStream (OutputStream stream) throws TFormerException |
Print the current Job using the selected FormLayout and current JobData. | |
void | printToStreams (OutputStreamFactory factory) throws TFormerException |
Print the current Job using the selected FormLayout and current JobData. | |
void | saveXml (String filename) throws TFormerException |
Saves the JobData used for printing a Job as XML file. | |
Package Functions | |
String | getPrintResult (DataFormat dataFormat) throws TFormerException |
Gets the data of the last print operation in specified format. | |
Properties | |
String | getOptions () |
Return the additional options for printing and output creation. | |
void | setOptions (String options) |
Sets additional options for printing and output creation. | |
String | getConfigurationFile () |
Gets the current configuration file for TFORMer SDK. | |
void | setConfigurationFile (String sConfigurationFile) |
Sets the current configuration file for TFORMer SDK. | |
String | getRepositoryName () |
Gets the filename of the Repository or the filename of the stand-alone FormLayout for this Job. | |
void | setRepositoryName (String sRepositoryName) |
Sets the filename of the Repository or the filename of the stand-alone FormLayout for this Job. | |
String | getProjectName () |
Gets the name of the Project for printing a Repository-based FormLayout. | |
void | setProjectName (String sProjectName) |
Sets the name of the Project for printing a Repository-based FormLayout. | |
String | getFormName () |
Gets the name of the Repository-based FormLayout for this Job. | |
void | setFormName (String sFormName) |
Sets the name of the Repository-based FormLayout for this Job. | |
String | getPrinterName () |
Gets the type and the name of the output device. | |
void | setPrinterName (String sPrinterName) |
Sets the name of the output device (file or printer) and the type of the printer (e.g. normal printer, PDF, JPG,....). | |
int | getNumberOfCopies () |
Gets the number of copies to be printed. | |
void | setNumberOfCopies (int numberOfCopies) throws IllegalArgumentException |
Sets the number of copies to be printed. | |
String | getJobTrayControlName () |
Gets the name of the JobTrayControl to be used for this Job. | |
void | setJobTrayControlName (String sJobTrayControlName) |
Sets the name of the JobTrayControl to be used for this Job. | |
String | getOutputName () |
Gets the name of the output file or the name of the spool-job (on Microsoft Windows printers). | |
void | setOutputName (String sOutputName) |
Sets the name of the output file or the name of the spool-job (on Microsoft Windows printers). | |
int | getFromPage () |
Gets the first page-number to be printed. | |
void | setFromPage (int nFromPage) |
Sets the first page-number to be printed. | |
int | getToPage () |
Gets the last page-number to be printed. | |
void | setToPage (int nToPage) |
Sets the last page number to be printed. | |
int | getStartColumn () |
void | setStartColumn (int startColumn) throws IllegalArgumentException |
Sets the column-number of the first label to be printed. | |
int | getStartRow () |
Gets the row-number of the first label to be printed. | |
void | setStartRow (int startRow) throws IllegalArgumentException |
Sets the row-number of the first label to be printed. | |
EPrinterType | getPrinterType () |
Gets the type of the generated output. | |
void | setPrinterType (EPrinterType printerType) |
Sets the type of the generated output. | |
JobData | getJobData () |
Gets the JobData for the Job. | |
void | setJobData (JobData jobData) |
Sets the JobData for the Job. | |
PrintResultType | getPrintResultType () |
Gets the type of data that should be gathered, while printing. | |
void | setPrintResultType (PrintResultType printResultType) |
Sets the type of data that should be gathered, while printing. |
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:
Job | ( | ) | throws TFormerException |
void dispose | ( | ) | throws TFormerException |
Releases the resources allocated by this instance.
In order to release allocated memory call this method always after the use of the instance.
String getConfigurationFile | ( | ) |
Gets the current configuration file for TFORMer SDK.
String getFormName | ( | ) |
Gets the name of the Repository-based FormLayout for this Job.
int getFromPage | ( | ) |
Gets the first page-number to be printed.
JobData getJobData | ( | ) |
String getJobTrayControlName | ( | ) |
Gets the name of the JobTrayControl to be used for this Job.
int getNumberOfCopies | ( | ) |
Gets the number of copies to be printed.
String getOptions | ( | ) |
Return the additional options for printing and output creation.
String getOutputName | ( | ) |
Gets the name of the output file or the name of the spool-job (on Microsoft Windows printers).
String getPrinterName | ( | ) |
Gets the type and the name of the output device.
Gets the type of the generated output.
String getPrintResult | ( | DataFormat | dataFormat | ) | throws TFormerException [package] |
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 before print or printToStreams.
dataFormat | Specifies the format of the data to be returned. |
Gets the type of data that should be gathered, while printing.
String getProjectName | ( | ) |
Gets the name of the Project for printing a Repository-based FormLayout.
String getRepositoryName | ( | ) |
Gets the filename of the Repository or the filename of the stand-alone FormLayout for this Job.
int getStartColumn | ( | ) |
Gets the column-number of the first label to be printed.
0
). int getStartRow | ( | ) |
Gets the row-number of the first label to be printed.
0
). int getToPage | ( | ) |
Gets the last page-number to be printed.
void print | ( | ) | throws TFormerException |
Prints the Job using the selected FormLayout and the current JobData.
void printToStream | ( | OutputStream | stream | ) | throws TFormerException |
Print the current Job using the selected FormLayout and current JobData.
The output is available in the provided output stream. Use printToStreams for bitmaps with multiple pages.
stream | Instance of the output stream |
void printToStreams | ( | OutputStreamFactory | factory | ) | throws TFormerException |
Print the current Job using the selected FormLayout and current JobData.
The output is available via multiple output streams created and closed by the provided OutputStreamFactory. With bitmap printer type (e.g. ImagePng) each page is printed on a separate stream.
factory | Instance used to create and close streams when needed |
void saveXml | ( | String | filename | ) | throws TFormerException |
void setConfigurationFile | ( | String | sConfigurationFile | ) |
Sets the current configuration file for TFORMer SDK.
sConfigurationFile | Path and filename of a TFORMer configuration file |
void setFormName | ( | String | sFormName | ) |
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.
sFormName | The name of the Repository-based FormLayout for this Job |
void setFromPage | ( | int | nFromPage | ) |
Sets the first page-number to be printed.
nFromPage | 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.setFromPage ( 0 ); job.setToPage ( 0 );
void setJobData | ( | JobData | jobData | ) |
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).
void setJobTrayControlName | ( | String | sJobTrayControlName | ) |
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_
.
sJobTrayControlName | The name of the JobTrayControl to be used for this Job |
void setNumberOfCopies | ( | int | numberOfCopies | ) | throws IllegalArgumentException |
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.
numberOfCopies | The number of copies to be printed |
IllegalArgumentException | An error is raised in case of a negative value. |
void setOptions | ( | String | options | ) |
Sets additional options for printing and output creation.
options | The options are passed as name/value pairs delimited by white-spaces in the form of [OptionName]=[value] .[OptionName] without an additional value is treated as if [OptionName]=true is provided.no[OptionName] is treated as if [OptionName]=false is provided |
void setOutputName | ( | String | sOutputName | ) |
Sets the name of the output file or the name of the spool-job (on Microsoft Windows printers).
Use setOutputName in conjunction with setPrinterType to specify the type and the target of the generated output. setPrinterName overrides the settings of setOutputName and setPrinterType. Refer to Output Format Prefixes for a description of the supported output formats.
sOutputName | The name of the output file or the name of the spool-job (on Microsoft Windows printers) |
void setPrinterName | ( | String | sPrinterName | ) |
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.
sPrinterName | The type and name of the output device |
void setPrinterType | ( | EPrinterType | printerType | ) |
Sets the type of the generated output.
Use setOutputName in conjunction with setPrinterType to specify the type and the target of the generated output. setPrinterName overrides the settings of setOutputName and setPrinterType. Refer to Output Format Prefixes for a description of the supported output formats.
printerType | The type of the generated output |
void setPrintResultType | ( | PrintResultType | printResultType | ) |
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 be retrieved by a call to getPrintResult.
printResultType | The type of data that should be gathered, while printing. |
void setProjectName | ( | String | sProjectName | ) |
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.setFormName.
sProjectName | The name of the Project for printing a Repository-based FormLayout |
void setRepositoryName | ( | String | sRepositoryName | ) |
Sets the filename of the Repository or the filename of the stand-alone FormLayout for this Job.
sRepositoryName | 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.setProjectName) and the FormLayout (Job.setFormName) as well.
void setStartColumn | ( | int | startColumn | ) | throws IllegalArgumentException |
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.setStartRow ( 0 ); job.setStartColumn ( 0 );
startColumn | The column-number of the first label to be printed (leftmost column has index 0 ) |
IllegalArgumentException | An error is raised in case of a negative value |
void setStartRow | ( | int | startRow | ) | throws IllegalArgumentException |
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.
startRow | The row-number of the first label to be printed (topmost row has index 0 ) |
IllegalArgumentException | An error is raised in case of a negative value. |
void setToPage | ( | int | nToPage | ) |
Sets the last page number to be printed.
Specifies the page number of the last page to be printed.
nToPage | The last page number to be printed |
© 2006-2024 - all rights reserved by TEC-IT Datenverarbeitung GmbH |
![]() |
Generated on Thu Oct 3 2024 05:08:23 for TFORMer SDK - JAVA with doxygen 1.7.6.1 |