DocumentLab-x64
1.2.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
Requires NuGet 4.7.0.0 or higher.
dotnet add package DocumentLab-x64 --version 1.2.0
NuGet\Install-Package DocumentLab-x64 -Version 1.2.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DocumentLab-x64" Version="1.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DocumentLab-x64 --version 1.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: DocumentLab-x64, 1.2.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install DocumentLab-x64 as a Cake Addin #addin nuget:?package=DocumentLab-x64&version=1.2.0 // Install DocumentLab-x64 as a Cake Tool #tool nuget:?package=DocumentLab-x64&version=1.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Fluent C# interface to DocumentLab
If scripts aren't your thing and you'd prefer to use a C# interface to DocumentLab when extracting data from document images you can use the fluent query extensions.
Data is always returned contained in a string object. It is up to the caller to do any necessary type conversions.
Header
using DocumentLab;
using System.Drawing;
Implementation
using (var dl = new Document((Bitmap)Image.FromFile("pathToSomeImage.png")))
{
// We know our documents have the customer number to the right of the labels we know of, we can be very specific about the direction
string customerNumber = dl.Query().GetValueForLabel(Direction.Right, "Customer number", "Cust no");
// We can ask DocumentLab to find the closest to the labels. The text type of the value to match is by default "Text".
string invoiceNumber = dl.Query()FindValueForLabel("Invoice number");
// Here we ask DocumentLab to specifically find a date value for the specified label
string dueDate = dl.Query()FindValueForLabel(TextType.Date, "Due date");
// We can build patterns using predicates, directions and capture operations that return the value matched in the document
string receiverName = dl
.Query()
.Match("PostCode") // All methods with text type parameters offer the TextType enum as well as a string variant of the method, this is because dynamically loaded contexgtual data files aren't statically defined
.Up()
.Match("Town")
.Up()
.Match("StreetAddress")
.Up()
.Capture(TextType.Text)
// We can build patterns that yield multiple results, the results need to be named and the response is a Dictionary<string, string>
Dictionary<string, string> receiverInformation = dl
.Query()
.Capture(q => q
.Capture("PostCode")
.Up()
.Capture("Town")
.Up()
.Capture("StreetAddress")
.Up()
.Capture("TextType.Text")
);
// We can ask for all dates in a document by using the GetAny method
string[] dates = dl.Query().GetAny(TextType.Date);
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net461 is compatible. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
- Antlr4.Runtime (>= 4.6.6)
- AutoCache.Lib (>= 1.1.1)
- Baseclass.Contrib.Nuget.Output (>= 2.4.3)
- Castle.Core (>= 4.3.1)
- Castle.Windsor (>= 4.1.0)
- EmguCV (>= 3.1.0.1)
- Magick.NET-Q8-x64 (>= 7.5.0.1)
- Microsoft.Net.Compilers (>= 3.4.0)
- Newtonsoft.Json (>= 11.0.2)
- OpenCvSharp3-AnyCPU (>= 3.4.1.20181108)
- OpenTK (>= 1.1.2225)
- OpenTK.GLControl (>= 1.1.2225)
- System.ValueTuple (>= 4.4.0)
- Tesseract (>= 3.3.0)
- ZedGraph (>= 5.1.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.