<< Click to Display Table of Contents >> VpeLoadTemplate |
Loads a template file and creates a Template Object from it in memory.
The function returns a handle of the template which has to be used as hTemplate-parameter in the other template-processing functions.
Using the VPE API, you can query the layout- and data source structure from a template. In addition you are able to perform several operations and modifications on a Template Object by code, including the assignment of values to fields (i.e. variables).
The parameter hDoc must be a valid VPE document handle. The template is logically linked to the specified VPE document and it will be removed automatically from memory when the VPE document is closed. Of course the template will be removed latest from memory when your application terminates.
VpeHandle VpeLoadTemplate(
VpeHandle hDoc,
LPCSTR file_name
)
VpeHandle hDoc
Document Handle
LPCSTR file_name
the path and file name of the file to load
Returns:
Handle of the Template Object, if the template file was found and could be loaded.
Otherwise NULL is returned and LastError is set.
Remarks:
In case of an error, LastError is set accordingly to the status of the load process.
If the template has assigned an Authenticity Key, this method will fail.
Use LoadTemplateAuthKey() for loading templates with an Authenticity Key.
"dycodoc Template Processing" in the Programmer's Manual