TFORMer SDK - JAVA
7.0
|
Provides access to JobDataCsv (a CSV-file that serves as JobData for a Job). More...
Public Member Functions | |
JobDataCsv () | |
Constructor for JobDataCsv. | |
JobDataCsv (String sFilename, char cSeparator, char cQualifier) | |
Constructor for JobDataCsv. | |
String | getFilename () |
Gets the filename of the CSV file. | |
char | getQualifier () |
Gets the qualifier character that encloses DataField values. | |
char | getSeparator () |
Gets the separator character that separates DataField names or DataField values. | |
boolean | isHandleEscapeSequences () |
Gets/Sets a flag indicating whether escape sequences in DataField values like \n or \x40 should be translated by TFORMer SDK. | |
boolean | isReuseValues () |
Gets a flag indicating whether DataField-values should be reused in consecutive records. | |
void | setFilename (String sFilename) |
Sets the filename of the CSV file. | |
void | setHandleEscapeSequences (boolean bHandleEscapeSequences) |
Sets a flag indicating whether escape sequences like \n or \x40 should be translated by TFORMer. | |
void | setQualifier (char cQualifier) |
Sets the qualifier character that encloses DataField values. | |
void | setReuseValues (boolean bReuseValues) |
Sets a flag indicating whether DataField values should be reused in consecutive Records. | |
void | setSeparator (char cSeparator) |
Sets the separator character that separates DataField names or DataField values. |
Provides access to JobDataCsv (a CSV-file that serves as JobData for a Job).
"
), the default separator character is the comma (,
). If the file uses no qualifiers, set the qualifier to '\0'
.,
) is used as separator character and the double quote ("
) is used as qualifier character: "Email","JobTitle","Name"
"support@tec-it.com","Support Engineer","Mr. Harald Backoffice"
"sales@tec-it.com","Sales Assistant","Mrs. Susan Frontdesk"
Assume the sample file specified above is stored in C:/temp/Import.txt. The corresponding call to create the JobData and to assign it to a Job is as follows: MISSING tff file that matches the given csv datafields, samples to be adopted too ****// Create a new Job instance Job printJob = new Job(); // Select the FormLayout (stand-alone or Repository-based) // ... // Create a new JobData instance // Here we import a CSV and specify separator and qualifier character JobDataCsv jobData = new JobDataCsv("c:/temp/Import.txt", ',', '"'); // Assign the JobData to the Job printJob.setJobData(jobData); // Select PDF output to /temp/out.pdf printJob.setOutputName ("/temp/out.pdf"); printJob.setPrinterType (EPrinterType.PDFFile); // Generate output based on the FormLayout and the JobData printJob.print ();
JobDataCsv | ( | ) |
JobDataCsv | ( | String | sFilename, |
char | cSeparator, | ||
char | cQualifier | ||
) |
Constructor for JobDataCsv.
Initializes a new instance of the JobDataCsv class.
sFilename | The filename. |
cSeparator | The separator character. |
cQualifier | The qualifier character ('\0' if no qualifier should be used). |
String getFilename | ( | ) |
Gets the filename of the CSV file.
char getQualifier | ( | ) |
char getSeparator | ( | ) |
boolean isHandleEscapeSequences | ( | ) | [inherited] |
Gets/Sets a flag indicating whether escape sequences in DataField values like \n or \x40 should be translated by TFORMer SDK.
true
if escape sequences in DataField values are translatedboolean isReuseValues | ( | ) | [inherited] |
Gets a flag indicating whether DataField-values should be reused in consecutive records.
false
if DataField-values are cleared between recordsvoid setFilename | ( | String | sFilename | ) |
Sets the filename of the CSV file.
sFilename | The filename of the CSV file |
void setHandleEscapeSequences | ( | boolean | bHandleEscapeSequences | ) | [inherited] |
Sets a flag indicating whether escape sequences like \n or \x40 should be translated by TFORMer.
bHandleEscapeSequences | true if escape sequences in DataField-values should be translated |
void setQualifier | ( | char | cQualifier | ) |
void setReuseValues | ( | boolean | bReuseValues | ) | [inherited] |
void setSeparator | ( | char | cSeparator | ) |
© 2006-2012 - all rights reserved by TEC-IT Datenverarbeitung GmbH |
![]() |
Generated on Tue Oct 23 2012 16:33:20 for TFORMer SDK - JAVA with doxygen 1.8.0 |