Link Search Menu Expand Document

DocumentParserAddTemplate Method (String)

Loads template from YAML or JSON file and adds it to internal template list. File can contain a single template or several templates as array. Multiple YAML templates can also be separated by "---" line instead of array.

Namespace:ByteScout.DocumentParser
Assembly: ByteScout.DocumentParser (in ByteScout.DocumentParser.dll) Version: 6.4.1.617-master
Syntax
public void AddTemplate(
	string templateFilename
)

Parameters

templateFilename
Type: SystemString
Template file name.
Remarks
There are also embedded templates that you can use to parse generic documents:

"internal://invoice" - simple invoice parser.

"internal://purchase_order" - simple purchase order parser.

Example:
// Load template from file:
documentParser.AddTemplate("c:\\templates\\template1.yml");
// Load embedded template:
documentParser.AddTemplate("internal://invoice");
See Also

Reference