Accusoft.FSInvoices1.Net - Updated
Load & Process Invoices
User Guide > How To > Load & Process Invoices

Inputs

A list of image identifiers must is passed to the Processor.Analyze.  In its simplest form, the identifiers are full paths to image files. If images are coming from locations other than the file system, a IImageProvider can be passed to access the images.

Images can be obtained for viewing using ImageLoader.

Processing

In order to process the images, use Accusoft.FSInvoices.Processor.

Example - how to setup  Accusoft.FSInvoices.Processor for processing
Copy Code
public void ProcessInvoices(List<string>         fileNames,
                             FormDefinition       formDefiniton,
                             ICompanyData         companyData,
                             IEnumerable<IVendor> vendorList)
 {
     using ( Licensing license = new Licensing())
     {
         // Setup the license keys
         license.SetSolutionName("YourSolutionName");
         license.SetSolutionKey(12345, 12345, 12345, 12345);
         license.SetOEMLicenseKey("2.0.AStringForOEMLicensingContactAccusoftSalesForMoreInformation…");
 
         // Create a processor for invoicing
         using (Processor invoiceProcessor = new Processor(license))
         {
             // Set the initial data
             invoiceProcessor.CompanyData = companyData;
             invoiceProcessor.VendorList = vendorList;
             invoiceProcessor.FormDefinition = formDefiniton;
 
             // Run Analyze on the file
             AnalyzeResults results = invoiceProcessor.Analyze(fileNames);
         }
     }
 }

CompanyData, FormDefinition, and a Vendor List has to be provided to the invoice processor before any processing can be performed upon the images. See Prerequisite To Processing for more information on these items.

Output

The product of a processing operation is AnalyzeResults. See understand AnalyzeResults.

An auxiliary output is the run log which can be used by the developer to monitor the events in the process flow for debugging purposes. More information can be found in the advance section under the heading Logging Services.