TFORMer SDK - DLL/Library
8
|
General functions which are mandatory for most applications. More...
General functions which are mandatory for most applications.
#define ERRCODE LONG |
Define the type for the error codes.
#define ErrOk S_OK |
Define error code for "no error" (ErrOk, 0)
#define LICKIND_DEVELOPER 3 |
Developer license.
Supports the use of TFORMer SDK in client-applications for a certain number of redistributions.
#define LICKIND_OFFICE 4 |
Office license.
Supports a certain number of installations or users within one facility or site (located at a single postal address).
#define LICKIND_SERVER 6 |
Server license.
Supports a certain number of total users for a (web-)server based installation.
#define LICKIND_SITE 2 |
Site license.
Supports a certain number of installations or users within one facility or site (located at a single postal address).
#define LICKIND_WORKGROUP 5 |
Workgroup license.
Supports a certain number of installations or users within one facility or site (located at a single postal address).
#define LICKIND_WORKSTATION 1 |
Workstation license.
Supports exactly one installation on a machine which is identified via the system-id.
enum EPrinterType |
This enumeration specifies the type of output generated by TFORMer SDK.
Choose between direct printing (Win32, Repository, Cups, PostscriptPrinter, TextPrinter, ZPLPrinter) and other supported output formats (PostscriptFile, HtmlFile, PdfFile, TextFile, ZPL-file or the various image formats).
ePrinterType_Default |
The default output device type. The output device which will be used depends on the type of the FormLayout to be printed.
|
ePrinterType_Win32 |
Direct printing to a Windows printer via GDI-calls (Microsoft Windows only). |
ePrinterType_Repository |
The printer as defined in the Repository or stand-alone FormLayout. In the later case only the printer |
ePrinterType_Cups |
A CUPS printer (Linux and UNIX only). |
ePrinterType_PSFile |
This printer type generates PostScript output as file. The PostScript header and footer used for each page may be customized. See |
ePrinterType_HTML |
This printer type generates HTML output as file. Some aspects of the index page and the footer appended to each generated HTML page may be customized. See |
ePrinterType_PDFFile |
This printer type generates PDF output as file. |
ePrinterType_PSPrinter |
This printer type sends PostScript output directly to the specific printer. The PostScript header and footer used for each generated page may be customized. See |
ePrinterType_TxtPrinter |
This printer type sends ASCII output directly to the specific printer. |
ePrinterType_TxtFile |
This printer type generates ASCII output as file. |
ePrinterType_ImageBmp |
This printer type generates BMP image files (one image file per page). The specified filename may contain #-characters as placeholders for the page-number. |
ePrinterType_ImageGif |
This printer type generates GIF image files (one image file per page). The specified filename may contain #-characters as placeholders for the page-number. |
ePrinterType_ImageJpg |
This printer type generates JPG image files (one image file per page). The specified filename may contain #-characters as placeholders for the page-number. |
ePrinterType_ImagePcx |
This printer type generates PCX image files (one image file per page). The specified filename may contain #-characters as placeholders for the page-number. |
ePrinterType_ImagePng |
This printer type generates PNG image files (one image file per page). The specified filename may contain #-characters as placeholders for the page-number. |
ePrinterType_ImageTga |
This printer type generates TGA image files (one image file per page). The specified filename may contain #-characters as placeholders for the page-number. |
ePrinterType_ImageTifSingle |
This printer type generates TIFF image files (one image file per page). The specified filename may contain #-characters as placeholders for the page-number. |
ePrinterType_ImageTifMultiPage |
This printer type generates multi-page TIFF image files (one image contains all output pages). |
ePrinterType_ZPLPrinter |
This printer type sends ZPL-II (ZEBRA Printer Language) output directly to the specific printer. |
ePrinterType_ZPLFile |
This printer type generates ZPL-II (ZEBRA Printer Language) output as file. |
ePrinterType_PDFA |
This printer type generates PDF/A output as file. |
ePrinterType_ZUGFeRD |
This printer type generates ZUGFeRD PDF/A-3 output as file and attaches the given ZUGFeRD-invoice.xml to it (see http://www.zugferd.de). |
ePrinterType_SVG |
This printer type generates SVG (Scalable Vector Graphics) output as file. |
ePrinterType_SVGZ |
This printer type generates SVGZ (Compressed Scalable Vector Graphics) output as file. |
ePrinterType_Invalid |
Invalid or unspecified printer type. Do not use this value (internal use only). |
enum ETFDataFormat |
Describes the desired format for requested data (e.g.
XML)
enum EVarType |
Defines the type of a DataField.
A DataField is a place-holder for dynamic content in a FormLayout. One FormLayout can use an arbitrary number of DataFields (0..n). TFORMer Designer requires that a DataField is defined before it can be used. This definition takes place directly in the FormLayout (in the case of a stand-alone FormLayout) or in a user-defined Project (or the GlobalProject ) of a Repository.
A DataField can be printed as text, as bar-code or may be used to provide the filename for image elements in the FormLayout. Besides this, a DataField can be used in element expressions and printing conditions.
The type of a DataField influences its use in expressions within a FormLayout and the conversion method when reading a DataField from a JobData. 3 different data types are supported:
The name of a DataField must comply with JavaScript rules for valid identifiers (see Naming Rules). In short a name must begin with a letter or an underscore. Within the name letters, underscores and digits are allowed. Special characters (e.g. white spaces, tabs, hyphens, German Umlauts, ...) are invalid.
Usually DataField names are not suitable for representing them to end-users. Refer to additional properties like Caption, Description, Comment and DisplayOrder for such purposes.
For printing a FormLayout it is required to provide the DataField values via JobData. When a JobData is used to pass data to TFORMer SDK and a DataField is not set by this JobData the value of the DataField will be an empty string ("") or 0 (see also TFormer_SetReuseValues).
The DefaultValue is the standard value of a DataField. The DefaultValue is only used by TFORMer Designer.
Use ValidationRules for validating values for DataField objects.
ValidationRules are expressions which are used to check if the value of a DataField meets a certain criteria. Whenever a DataField value violates the assigned ValidationRule an error message is displayed (in TFORMer Designer) or an exception is raised (TFORMer SDK).
In order to programmatically access the DataFields in a FormLayout you may either use the method TFormer_GetFirstProjectVarIt or you may iterate through all available DataField objects using TFormer_GetFirstProjectVarIt and TFormer_GetNextProjectVarIt. If you want to know, whether the returned DataField is actually used in the FormLayout use the method TFormer_ProjectVarItGetUsage.
To determine if a specific DataField is used in a FormLayout iterate all data-fields of the Project and query the usage:
// Enumerate all DataFields in the Project HPROJECTVAR_ITERATOR it = TFormer_GetFirstProjectVarIt (hTForm, pszProjectName, &eCode); BOOL bProjectVarValid = (it != NULL); LPCSTR pszDataFieldName = NULL; // TYPE_E_ELEMENTNOTFOUND should not be treated as error if (eCode == TYPE_E_ELEMENTNOTFOUND) eCode = ErrOk; // iterate all DataFields while (bProjectVarValid && (eCode == ErrOk)) { // Query the DataField usage in the given FormLayout EVarUsage eVarUsage = TFormer_ProjectVarItGetUsage (hTForm, it, &eCode); if ((eVarUsage == eVarUsage_Normal) && (eCode == ErrOk)) { pszDataFieldName = TFormer_ProjectVarItGetName (it, &eCode); if (pszDataFieldName != NULL && eCode == ErrOk) printf (" %s\n", pszDataFieldName); } // get next DataField bProjectVarValid = (TFormer_GetNextProjectVarIt (it) == ErrOk); } // release iterator TFormer_FreeProjectVarIt (it);
eVarType_Text |
A text (string or character). This is the recommended DataFieldType. |
eVarType_Long |
An integer number. When reading a DataField of this type from a JobData it is converted automatically to an integer. In case of conversion errors the result is 0 (no error or exception will be raised). |
eVarType_Float |
A floating point number. When reading a DataField of this type from a JobData it is converted automatically to a floating point number. In case of conversion errors the result is 0 (no error or exception will be raised). |
eVarType_Invalid |
Invalid, internal use only. |
enum EVarUsage |
Describes the usage of a DataField within a FormLayout.
eVarUsage_NotUsed |
The DataField is defined within the Project but is not used in the FormLayout. |
eVarUsage_Normal |
A normal DataField. The DataField is in use by the FormLayout, its value is not modified. The DataField is just used as part of expressions or directly in text-, bar-code or picture elements. Therefore the value for this DataField may be provided by an external application or by the user. |
eVarUsage_Calculated |
The DataField is computed automatically. The DataField is in use by the FormLayout and its value is modified. Usually this is done via pre- or post-expressions. Therefore the value for this DataField may not be provided by an external application or by the user. |
eVarUsage_Parameter |
This is a writable system-DataField used by the FormLayout. The value of this system-DataField may be provided by an external application or by the user (e.g. tfDocumentName). |
eVarUsage_Invalid |
Invalid. |
ERRCODE TFormer_Exit | ( | HTFORM | pInstance | ) |
Frees system resources previously allocated with TFormer_Init.
Frees system resources allocated by TFormer_Init. Call this function before exiting your application or if TFORMer SDK should be unloaded from memory. After this call the TFORMer SDK must be initialized again (with TFormer_Init) before using it.
pInstance | The instance provided by a previous call to TFormer_Init |
HTFORM TFormer_Init | ( | HTFRepository | hRepository | ) |
Allocates and initializes internal memory.
This function must be called after loading the TFORMer library. All other calls to the library must be performed after TFormer_Init. Each thread of your application (if multi-threaded) must call TFormer_Init and must use the returned handle for subsequent calls.
NULL
if an error occurredhRepository | Provide NULL in all cases. This parameter is used internally by TEC-IT to provide a handle to an already opened Repository. |
void TFormer_License | ( | LPCSTR | pszLicensee, |
DWORD | dwKind, | ||
LONG | nLicenses, | ||
LPCSTR | pszLicenseKey | ||
) |
License this TFORMer SDK instance.
The licensing method needs to be called prior to any call generating output (e.g. TFormer_Print). It is recommended to call this method once immediately after loading the TFORMer SDK. You will receive the license information from TEC-IT Datenverarbeitung GmbH after ordering (https://www.tec-it.com/order). All license values must be specified exactly as received from TEC-IT. The license kind, the number of licenses and the licensee string are checked against the license key.
pszLicensee | Licensee name (provided by TEC-IT) |
dwKind | License kind (provided by TEC-IT) |
nLicenses | Number of licenses (provided by TEC-IT) |
pszLicenseKey | License key (provided by TEC-IT) |
© 2006-2024 - all rights reserved by TEC-IT Datenverarbeitung GmbH |
![]() |
Generated on Sat Oct 5 2024 05:08:16 for TFORMer SDK - DLL/Library with doxygen 1.7.6.1 |