惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

IT之家
IT之家
NISL@THU
NISL@THU
The Hacker News
The Hacker News
C
CXSECURITY Database RSS Feed - CXSecurity.com
T
Tenable Blog
Forbes - Security
Forbes - Security
V2EX - 技术
V2EX - 技术
Webroot Blog
Webroot Blog
Schneier on Security
Schneier on Security
T
The Exploit Database - CXSecurity.com
T
Tor Project blog
C
Cisco Blogs
TaoSecurity Blog
TaoSecurity Blog
The Last Watchdog
The Last Watchdog
PCI Perspectives
PCI Perspectives
O
OpenAI News
C
Cyber Attacks, Cyber Crime and Cyber Security
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Google Online Security Blog
Google Online Security Blog
宝玉的分享
宝玉的分享
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
量子位
D
Docker
AI
AI
Blog — PlanetScale
Blog — PlanetScale
S
Security @ Cisco Blogs
S
Schneier on Security
The GitHub Blog
The GitHub Blog
W
WeLiveSecurity
云风的 BLOG
云风的 BLOG
M
MIT News - Artificial intelligence
P
Privacy International News Feed
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
H
Hackread – Cybersecurity News, Data Breaches, AI and More
B
Blog
C
Check Point Blog
A
About on SuperTechFans
D
Darknet – Hacking Tools, Hacker News & Cyber Security
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Engineering at Meta
Engineering at Meta
I
InfoQ
T
Threat Research - Cisco Blogs
Project Zero
Project Zero
Cloudbric
Cloudbric
MongoDB | Blog
MongoDB | Blog
Cisco Talos Blog
Cisco Talos Blog
L
Lohrmann on Cybersecurity
S
Securelist

Inside Nutrient

A guide to the invisible work behind documents Introducing Nutrient Documents for Salesforce: Native document generation and signing Document AI vs. traditional OCR: Choosing between OCR, AI, and hybrid pipelines PDF SDK compliance and security evaluation checklist for enterprise teams (2026) Invariant Corp replaces paper processes with Nutrient Workflow and scales without limits What is process mapping? A complete guide Nutrient vs. Conga Composer for Salesforce document generation (2026) Document routing: How to automate document distribution The CTO’s AI playbook: Why accountability architecture beats orchestration Compliance workflow automation: Why built-in compliance is table stakes Workflow diagrams: Examples, symbols, and how to build one that actually runs Digital forms: Replace paper forms with automated workflows Approval workflow software: How to automate approvals Why document-centric automation is different The CEO’s AI playbook: Why decision architecture beats model selection Nutrient SDK product updates for Q1 2026 PDF redaction verification: How to prove sensitive data is permanently removed What is a VPAT? The complete guide to accessibility conformance reports What is PDF/UA? The accessible PDF standard explained Salesforce eSignatures: Generate, sign, and track documents in one flow Online document viewer: Options, tradeoffs, and how to embed one Document viewer for web apps: React, Vue, Angular (2026) Best document viewers in 2026: A buyer’s guide How to edit a PDF in Python: Add text, images, and annotations Nutrient advances Workflow platform with agentic AI for enterprise-grade speed and consistency in document-heavy operations How to create a Salesforce quote template from opportunity data The business case for accessibility: Five ways it drives enterprise value Python PDF library comparison (2026): 7 libraries for developers Why your AI agent hallucinates PDF table data PDF.js limitations: When to upgrade to a commercial PDF SDK How Subject scaled 5× with Nutrient’s PDF SDK without rebuilding its document layer I replaced our sales training with an AI coach that runs in Slack — here’s what broke Redirecting to: https://securitybuzz.com/cybersecurity-news/why-enterprise-permissions-are-ais-most-dangerous-inheritance/ Nutrient .NET SDK vs. iText Core: Complete comparison for .NET developers DocuVieware: Support’s most frequently asked setup questions Introducing Nutrient Workflow How to convert PDF to Word in C# (.NET) When email and spreadsheets stop working: Work order approval workflows for field teams on the move Compliance with confidence: Why document-centric automation is the foundation of your mission Nutrient expands AI Assistant, automating multistep document workflows inside any application What is document generation? A developer’s guide to PDF generation Document Converter data flow and how real-time watermarks skip the queue PDF/UA compliance guide: Requirements, standards, and best practices Computers still can’t understand you How Athena Intelligence built AI agents for regulated enterprises with Nutrient’s document infrastructure How to convert HTML to PDF (2026): 4 methods from browser print to SDK How to build a document extraction pipeline with Nutrient Vision API OCR vs. intelligent document processing: Choosing the right document extraction engine Beyond OCR: How document intelligence eliminates manual processing in regulated industries Nutrient vs. IronPDF: Complete comparison for .NET developers Nutrient vs. Aspose.PDF: Complete comparison for .NET developers Redirecting to: https://fortune.com/2026/02/19/openclaw-who-is-peter-steinberger-openai-sam-altman-anthropic-moltbook/ Lufthansa Systems uses Nutrient to deliver reliable, scalable PDF rendering for pilots worldwide Nutrient vs. Syncfusion: Complete comparison for .NET developers React’s useTransition: The hook you’re probably using wrong First City Monument Bank streamlines banking processes with Nutrient Workflow Redirecting to: https://www.sdcexec.com/warehousing/automation/article/22957364/nutrient-workflow-automation-the-missing-link-in-supply-chain-efficiency The complete guide to digital signatures: PAdES, CAdES, and XAdES explained Nutrient Python SDK: Production-grade document processing for Python Introducing agentic document editing for web applications with AI Assistant Nutrient vs. QuestPDF: Complete comparison for .NET developers How we fixed the GdPicture license expiration (and what to do if you’re affected) Red team security testing with agentic AI The future of healthcare document automation Best healthcare workflow software compared Nutrient SDK product updates for Q4 2025 How Harvey scaled legal document workflows 50 percent MoM without rebuilding infrastructure HIPAA-compliant document management in hospitals How we optimized rendering performance while handling thousands of annotations in React — Part 2 Automated PII removal with Nutrient API Redirecting to: https://www.devopsdigest.com/2026-low-code-no-code-predictions Redirecting to: https://www.kmworld.com/Articles/Editorial/ViewPoints/Leaders-predict-AI-to-continue-permeating-all-aspects-of-KM-in-2026-172594.aspx What are deep agents and how do they solve complex problems? Whipping up document magic: Your easy-bake recipe for Vue and Nutrient Web SDK 🧁 What I’ve learned about product iteration planning while building SDKs Passwordless document signing: Three-layer security guide New zip folder functionality streamlines file management in Document Automation Server The keyboard shortcuts playbook: Taking control of keyboard events in Nutrient Web SDK From experienced engineer to AI beginner: My unexpected journey AI-assisted manual testing: Handling Safari’s PDF rendering and UI quirks How to keep a 20-year-old SDK up to date How we optimized rendering performance while handling thousands of annotations in React — Part 1 Nutrient announces new executive hires to accelerate next phase of growth High performance UI using web workers Automate document conversion at scale with Python and Nutrient DCS From curiosity to PLG (and AI): My journey to understanding product-led growth Prost to progress: One year as Nutrient Pigeon usage at Nutrient: Bridging native SDKs to Flutter Modernizing CI build servers: How to migrate from Chef to Ansible Unix man pages: AI-friendly documentation since 1971 Consistent hashing for even load distribution Best AI redaction APIs: Complete comparison guide for 2025 Why AI document redaction matters for modern security From coding to coordinating: How AI transformed my workflow What is intelligent document processing (IDP)? A complete guide Enterprise PDF SDKs: Best PSPDFKit (now Nutrient) alternatives Nutrient SDK product updates for Q3 2025 GdPicture support best practices Redacting sensitive data with Nutrient AI redaction API How AI is transforming the customer experience at Nutrient: From instant answers to intelligent support
Key-value pair extraction from PDF documents
Marija Trpkovic · 2024-05-31 · via Inside Nutrient

Table of contents

    Key-value pair extraction from PDF documents

    One of the key changes introduced in Muhimbi PDF Converter Services v11.0 is the inclusion of key-value pair (KVP) extraction from PDF documents. This feature takes advantage of AI, machine learning (ML), and advanced layout understanding to extract meaningful information from unstructured documents and images.

    The Muhimbi Document Converter Diagnostics Tool, installed along the service, can help you discover these new features.

    Key-Value Pair extraction with the Diagnostics Tool

    This post provides a simple example describing how to take advantage of this new feature programmatically.

    Key-value pair extraction offers numerous benefits for businesses and developers:

    Automated Data Extraction — Automate the tedious process of extracting data from documents, reducing manual labor and human error. Enhanced Accuracy — Utilize AI PDF data extraction and ML technologies to ensure high accuracy in data extraction, even from complex and unstructured documents. Save Time — Significantly speed up data processing times by automating extraction tasks that would otherwise take hours to complete manually. Versatile Integration — Integrate with various applications and services, enhancing the functionality and efficiency of existing systems. Improved Data Handling — Ensure consistent and structured data output, making it easier to handle, analyze, and utilize extracted information.

    This tutorial shows how to create a .NET Framework console application and extract key-value pairs from a PDF document.

    1. Download and install Muhimbi PDF Converter or Muhimbi PDF Converter Services from our website.
    2. Create a new Console Application project in Visual Studio called KVPExtraction. The actual version of the .NET Framework isn’t important, as Web Services are system-agnostic, meaning they can be used by client applications written in a wide variety of programming languages.
    3. In the Solution Explorer window, right-click the project and select Add > Service Reference. Set the Address field to https://localhost:41734/Muhimbi.DocumentConverter.WebService/ and click Go. Define your desired namespace (in this case, DocumentConverterService) and click OK. This will generate the required proxy classes to be able to work with the Web Service.

    Service Reference

    1. In your Program.cs file, add the following code:

    using KVPExtraction.DocumentConverterService;

    using System;

    using System.IO;

    using System.ServiceModel;

    namespace KVPExtraction

    {

    class Program

    {

    // The URL where the Web Service is located. Amend host name if needed.

    static string SERVICE_URL = "https://localhost:41734/Muhimbi.DocumentConverter.WebService/";

    static void Main(string[] args)

    {

    DocumentConverterServiceClient client = null;

    try

    {

    // Determine the source file and read it into a byte array.

    string sourceFileName = null;

    if (args.Length == 0)

    {

    // If nothing is specified then read the first PDF file from the current folder.

    string[] sourceFiles = Directory.GetFiles(Directory.GetCurrentDirectory(), "*.pdf");

    if (sourceFiles.Length > 0)

    sourceFileName = sourceFiles[0];

    else

    {

    Console.WriteLine("Please specify a document to extract key-value pairs from.");

    Console.ReadKey();

    return;

    }

    }

    else

    sourceFileName = args[0];

    string expectedKeys = null;

    if (args.Length > 1)

    {

    // The second argument is the expected keys file. Read its content.

    expectedKeys = File.ReadAllText(args[1]);

    }

    else

    {

    // Uncomment the line below if you wish to use the following expected keys.

    //expectedKeys = "[{\"expectedKey\":\"grand total\",\"synonyms\":[\"total\"]},{\"expectedKey\":\"invoice number\",\"synonyms\":[\"invoice no.\"]}]";

    }

    byte[] sourceFile = File.ReadAllBytes(sourceFileName);

    // Open the service and configure the bindings.

    client = OpenService(SERVICE_URL);

    // Set the absolute minimum open options.

    OpenOptions openOptions = new OpenOptions();

    openOptions.OriginalFileName = Path.GetFileName(sourceFileName);

    openOptions.FileExtension = Path.GetExtension(sourceFileName);

    // Set the parameters for extracting key-value pairs.

    KVPSettings kvpSettings = new KVPSettings()

    {

    // Specify whether or not the internal image should be automatically rotated.

    AutoRotate = BooleanEnum.True,

    // Only include results with a confidence higher than the threshold (in %).

    ConfidenceThreshold = 50,

    // Specify virtual resolution for retrieving data. Higher values will make the process more accurate but slower.

    DPI = 300,

    // Specify the expected keys or leave empty to resolve all pairs.

    // Please note that extra information isn't included when `ExpectedKeys` is used.

    ExpectedKeys = expectedKeys,

    // Specify whether or not the confidence value for the extracted key-value pair should be included in the result.

    IncludeConfidence = BooleanEnum.True,

    // Specify whether or not the bounding box information for the key should be included.

    IncludeKeyBoundingBox = BooleanEnum.True,

    // Specify whether or not the page number the pair was found on should be included.

    IncludePageNumber = BooleanEnum.True,

    // Specify whether or not the type of the value should be included.

    IncludeType = BooleanEnum.True,

    // Specify whether or not the bounding box of the value should be included.

    IncludeValueBoundingBox = BooleanEnum.True,

    // Specify the desired output format (XML, JSON, or CSV).

    KVPFormat = KVPOutputFormat.CSV,

    // Specify the language used for OCR.

    OCRLanguage = "eng",

    // Specify the range of pages to search on.

    PageRange = null,

    // Specify whether or not extra symbols should be trimmed from values.

    TrimSymbols = BooleanEnum.False

    };

    Console.WriteLine("Extracting key-value pairs.");

    // Carry out the extraction.

    byte[] result = client.ExtractKeyValuePairs(sourceFile, openOptions, kvpSettings);

    if (result != null)

    {

    string destinationFileName = Path.GetFileNameWithoutExtension(sourceFileName) + "." + kvpSettings.KVPFormat;

    using (FileStream fs = File.Create(destinationFileName))

    {

    fs.Write(result, 0, result.Length);

    fs.Close();

    }

    Console.WriteLine("Result saved into " + destinationFileName);

    }

    else

    {

    Console.WriteLine("Nothing returned.");

    }

    Console.WriteLine("Finished.");

    }

    catch (FaultException<WebServiceFaultException> ex)

    {

    Console.WriteLine("FaultException occurred: ExceptionType: " +

    ex.Detail.ExceptionType.ToString());

    }

    catch (Exception ex)

    {

    Console.WriteLine(ex.ToString());

    }

    finally

    {

    CloseService(client);

    }

    Console.ReadKey();

    }

    /// <summary>

    /// Configure the bindings and endpoints and open the service using the specified address.

    /// </summary>

    /// <returns>An instance of the Web Service.</returns>

    public static DocumentConverterServiceClient OpenService(string address)

    {

    DocumentConverterServiceClient client = null;

    try

    {

    BasicHttpBinding binding = new BasicHttpBinding();

    // Use standard Windows Security.

    binding.Security.Mode = BasicHttpSecurityMode.TransportCredentialOnly;

    binding.Security.Transport.ClientCredentialType =

    HttpClientCredentialType.Windows;

    // Increase the client Timeout to deal with (very) long running requests.

    binding.SendTimeout = TimeSpan.FromMinutes(120);

    binding.ReceiveTimeout = TimeSpan.FromMinutes(120);

    // Set the maximum document size to 50MB.

    binding.MaxReceivedMessageSize = 50 * 1024 * 1024;

    binding.ReaderQuotas.MaxArrayLength = 50 * 1024 * 1024;

    binding.ReaderQuotas.MaxStringContentLength = 50 * 1024 * 1024;

    // Specify an identity (any identity) to get it past .net3.5 sp1.

    EndpointIdentity epi = EndpointIdentity.CreateUpnIdentity("unknown");

    EndpointAddress epa = new EndpointAddress(new Uri(address), epi);

    client = new DocumentConverterServiceClient(binding, epa);

    client.Open();

    return client;

    }

    catch (Exception)

    {

    CloseService(client);

    throw;

    }

    }

    /// <summary>

    /// Check if the client is open and then close it.

    /// </summary>

    /// <param name="client">The client to close.</param>

    public static void CloseService(DocumentConverterServiceClient client)

    {

    if (client != null && client.State == CommunicationState.Opened)

    client.Close();

    }

    }

    }

    Sample Input

    When the program above is executed on the PDF document and expected keys JSON below, it retrieves values for the expected keys and their synonyms.

    PDF Document

    Here’s an example of how the PDF document looks.

    Sample input PDF

    Expected Keys

    Here are the expected keys:

    [

    {

    "expectedKey": "grand total",

    "synonyms": ["total"]

    },

    {

    "expectedKey": "invoice number",

    "synonyms": ["invoice no."]

    }

    ]

    Sample Output

    Note: The expectedKey property from the JSON above is used as the key property in the output.

    Sample csv output

    Conclusion

    By leveraging Muhimbi PDF Converter Services’ new key-value pair extraction feature, you can streamline data extraction processes, reduce manual labor, and ensure high accuracy and consistency in your data handling workflows. Whether you’re processing invoices, forms, or any other documents, this feature can greatly enhance your document management system’s efficiency and effectiveness.

    Explore related topics

    Try for free Ready to get started?

    Related Low-Code articles

    Explore more