🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

documentextractsdk

Package Overview
Dependencies
Maintainers
0
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

documentextractsdk

1.0.0-beta02
NuGet
Version published
Maintainers
0
Created
Source

Document Extract SDK for .NET

The Document Extract SDK allows seamless integration of .NET applications with the Document Extract API. It provides functionality to extract structured JSON data from images and PDF documents. With this SDK, you can automate document processing and data extraction, including features like text recognition, form handling, and signature detection.

Features

  • Extracts data from PDF and image documents.
  • Supports form field extraction, including checkboxes and radio buttons.
  • Detects and extracts signatures from documents.
  • Handles table detection and extraction.
  • Easy integration with .NET applications.

Installation

You can install the Document Extract SDK for .NET via NuGet Package Manager:

bash Install-Package DocumentExtractSDK

Or by using the .NET CLI:

dotnet add package DocumentExtractSDK

Usage Example

Below is an example of how to use the SDK to extract data from a document:

string apiKey = "your-api-key";
string filePath = "C:/Users/Test/Downloads/test.pdf";
using var fileStream = File.OpenRead(filePath);

var request = new DocumentExtractRequest
{
    Features = new List<string> { Features.FORMS, Features.SIGNATURES },
    File = new FormFile(fileStream, 0, fileStream.Length, "file", Path.GetFileName(fileStream.Name)),
    UseAutomaticTypeMatching = true
};

var documentExtractClient = new DocumentExtractClient(apiKey);
var result = await documentExtractClient.GetExtractResultAsync<FormData>(request);
// result.OcrText OcrText property contains text extracted from the document
// result.FormData contains FORMS data extracted from the document
// result.Signatures contains SIGNATURES data extracted from the document
// result.Tables contains TABLES data extracted from the document

Or use below example to manually specify the fields to extract

string apiKey = "your-api-key";
string filePath = "C:/Users/Test/Downloads/test.pdf";
using var fileStream = File.OpenRead(filePath);

var request = new DocumentExtractRequest
{
    Features = new List<string> { Features.FORMS, Features.SIGNATURES },
    File = new FormFile(fileStream, 0, fileStream.Length, "file", Path.GetFileName(fileStream.Name)),
    UseAutomaticTypeMatching = false,
    ExtractProperties = [
        "firstName",
        "lastName",
        "gender",
        "dateOfBirth",
        "education",
        "languagesSpoken",
        "address with addressLine1, addressLine2, city, state, zip",
        "homePhone",
        "cellPhone",
        "workPhone",
        "email",
        "availableWeekHours",
        "availableMonthHours",
        "availableDaysAndTime",
        "hasVehicle",
        "vehicleType",
        "licenseNumber",
        "licenseState",
        "pastVolunteerExperience",
        "references list of name and phone",
        "hasSignature",
        "signatureDate"]
};

var documentExtractClient = new DocumentExtractClient(apiKey);
var result = await documentExtractClient.GetExtractResultAsync<FormData>(request);
// result.OcrText OcrText property contains text extracted from the document
// result.FormData contains FORMS data extracted from the document
// result.Signatures contains SIGNATURES data extracted from the document
// result.Tables contains TABLES data extracted from the document

Available Features

  • FORMS: Extract form fields like checkboxes, text fields, and radio buttons.
  • SIGNATURES: Detect and extract signatures from documents.
  • TABLES: Detect and extract tables from documents.

Authentication

To use the API, you need to sign up for a Document Extract account and get your API key.

License

MIT License

Copyright (c) 2025 Document Extract LLC

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Support

For support, please reach out to our team via support@documentextract.com.

Keywords

FAQs

Package last updated on 19 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts