iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Yes—you can turn a PDF into application-ready JSON with Microsoft Foundry Document Intelligence. The SDK submits a file or URL to a selected analysis model, waits for the asynchronous operation to finish, and exposes OCR text, page geometry, tables, selection marks, key-value pairs, and model-specific fields. For most general PDFs, prebuilt-layout is the starting point; domain models are better for invoices, receipts, W-2s, and identity documents, while custom neural models handle business documents whose layouts vary.
The current generally available path is the v4.0 SDK family, which targets REST API version 2024-11-30. Microsoft publishes 1.0.0 packages for .NET/C#, Java, JavaScript, and Python. Your application still needs an Azure subscription and a Document Intelligence resource; the F0 tier is useful for learning but is limited to 500 pages per month and much smaller files than paid S0.
What does the Microsoft Foundry Document Intelligence SDK do?
Document Intelligence is a cloud service in Foundry Tools that applies machine learning to documents. Its SDK is a set of language libraries and tools for integrating those models into an application, while the REST API provides the same service through HTTP. Instead of returning only a flat OCR string, an analysis operation can preserve document structure and the coordinates needed to reconstruct it.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsA typical result can contain pages, lines, words, languages, bounding locations, tables, selection marks such as checkboxes, key-value pairs, and fields defined by a domain or custom model. That structure is what lets a downstream system validate a total, associate a label with a value, or render a table rather than trying to parse plain text with regular expressions.
Popular on Amazon
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
How do I extract text and tables from a PDF?
The process is an asynchronous, six-stage pipeline. Build each stage explicitly so that credentials, model choice, polling, and normalization are observable in production.
- Create the Azure resource. Provision a Document Intelligence resource in your Azure subscription, then obtain its endpoint and access key. Keep those values in a secret store rather than embedding them in source code.
- Install and pin an SDK package. Choose the official package for .NET/C#, Java, JavaScript, or Python. Pin the package version and record the REST API version your deployment targets; this prevents a silent model or response change during a later upgrade.
- Choose the model and submit the input. Send either a PDF URL or a file stream to the model through the SDK or REST API. The selected model determines whether the response emphasizes OCR, layout, domain fields, or custom fields.
- Poll the long-running operation. Submission returns an analysis operation rather than the final document. Poll until the service reports completion, and treat failure or cancellation as a separate state that your queue can retry or route for review.
- Read the structured response. Traverse the returned pages and fields. Capture the text, table cells, selection marks, key-value pairs, model fields, page numbers, locations, and confidence values that your use case needs.
- Normalize into your own schema. Map the service response to stable application JSON, preserve the original page reference for every important value, and retain confidence scores so a reviewer or later rule can challenge uncertain extraction.
This separation matters. The service’s response schema is optimized for document analysis, while your database or API schema should be optimized for business operations. Keeping a normalization layer lets you change models without rewriting every consumer.
Which Document Intelligence model should I use?
Choose by the information you need and how consistent the source documents are. The table below summarizes the model families available in the current documentation.
Recommended Free Tools
| Model | Best fit | What it provides | Training or configuration |
|---|---|---|---|
prebuilt-read |
OCR when you primarily need readable text | Lines, words, locations, and detected languages | No custom training |
prebuilt-layout |
General PDFs and documents where structure matters | Text and locations, tables, selection marks, and document structure; key-value extraction when features=keyValuePairs is enabled in v4.0 |
No custom training |
| Domain prebuilt models | Invoices, receipts, W-2 forms, and identity documents | Specialized fields for the matching document domain | No custom training for the supported domain |
| Custom neural | Structured, semi-structured, or unstructured business documents with layout variation | Custom fields; v4.0 adds overlapping fields, signature detection, and confidence for tables, rows, and cells | Train with labeled examples; extraction can start with five examples of the same document type |
| Custom template | Forms that share a stable visual template | Fields tied to a consistent arrangement | Separate models may be needed when visual layouts differ |
| Custom classifier | Files containing several document types | Classification and splitting before extraction | v4.0 supports Office document classification and incremental training |
When should I use prebuilt-read?
Use it when OCR is the requirement and layout-aware objects are not needed. It is a lightweight foundation for obtaining words, lines, locations, and languages, but it does not provide the table and selection-mark structure that a form-processing workflow usually needs.
When is prebuilt-layout the right choice?
Start with prebuilt-layout for a general PDF whose value lies in its arrangement: reports with tables, forms with checkboxes, or pages where coordinates are needed to rebuild reading order. In v4.0, key-value extraction is an opt-in feature, so include features=keyValuePairs when you need label/value relationships in addition to layout and OCR.
When do domain models save the most work?
If the input is an invoice, receipt, W-2, or identity document and the corresponding prebuilt model supports it, use that model before designing your own schema. Its specialized fields reduce the amount of field mapping and validation code you have to maintain. Confirm that incoming documents really match the domain; a generic business form should not be forced through an invoice model.
Also popular on Amazon
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
Should I use a custom neural or custom template model?
Use a custom neural model when the same business document changes layout across suppliers, departments, or revisions. Use a custom template model only when the visual arrangement is reliably fixed; layout variation can reduce its accuracy and may require separate models.
Custom neural extraction can begin with five examples of the same form or document type, but that minimum is not a guarantee of production quality. Label examples that represent the real variation in print quality, field placement, optional sections, and table shapes. In v4.0, overlapping fields, signature detection, and table, row, and cell confidence provide more signals for validation and review.
A template model can be efficient for a tightly controlled form, because its stable geometry is an advantage. The trade-off appears when a redesign, a different vendor, or a regional version moves fields: you may need another template model rather than expecting one model to generalize.
How do I process a PDF that contains several document types?
Put a custom classifier in front of extraction when one file can contain mixed documents. The classifier identifies document types and splits the file so each segment can be sent to the appropriate extraction model instead of applying one schema to every page.
Version 4.0 also supports classification of Office documents and incremental training. That is useful when the set of document categories grows over time, because classification can remain a distinct stage from field extraction and be improved independently.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →What does the SDK return, and how should I convert it to JSON?
The SDK response is already structured, but it is not automatically your business object. Treat it as an evidence-rich intermediate representation.
Also popular on Amazon
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
- Document identity: record the model identifier, API/package version, source file identifier, and analysis timestamp in your own metadata.
- Page context: retain page numbers and locations for values that a person may need to verify. Coordinates are especially important when reading order is ambiguous.
- Text hierarchy: preserve pages, lines, and words when search, highlighting, or redaction is required; store only normalized text when geometry has no downstream value.
- Tables: map each table to rows and cells while preserving cell locations and, for custom neural results in v4.0, table, row, and cell confidence.
- Forms: represent selection marks and key-value pairs separately from free text so an unchecked box is not mistaken for a missing field.
- Confidence and review state: carry confidence into your JSON and assign a review status through your own rules. A low-confidence value should be traceable to its page and source location.
Do not discard the raw analysis response immediately. Keeping it, or an access-controlled archive of the relevant portions, gives you an audit trail when a normalized value is challenged.
What file limits apply to PDF analysis?
Limits depend on the model, file type, and service tier. For v4.0 layout analysis, the documented input formats include PDF, JPEG/JPG, PNG, BMP, TIFF, HEIF, DOCX, XLS/XLSX, PPTX, and HTML.
| Constraint | Free F0 | Paid S0 |
|---|---|---|
| Maximum analysis file size | 4 MB | 500 MB |
| PDF/TIFF page handling | Only the first two pages are processed | PDFs and TIFFs can contain up to 2,000 pages |
| Learning allowance | 500 pages per month | Usage follows the paid tier and its service limits |
Password-protected PDFs must be unlocked before submission. A file that exceeds the tier’s size or page allowance will fail or be truncated according to the documented limit, so validate those properties before creating an analysis operation.
Request-rate and throttling numbers change by API version and tier. Use Microsoft’s current service-limits page for the quota matrix that applies to your deployment, and design backoff and queueing rather than assuming unlimited parallel requests.
What changed with the v4.0 SDK and API?
The v4.0 generally available SDK targets REST API 2024-11-30. Microsoft lists 1.0.0 GA packages for .NET/C#, Java, JavaScript, and Python, with support for Windows, macOS, Linux, and Docker.
Older 3.1 and 3.0 lines remain documented, but the version matrix marks 3.0 as retiring. Pin both the package and API version in application documentation, test fixtures, and deployment configuration. When upgrading, compare response schemas and model behavior rather than assuming a package update is behavior-neutral.
Also popular on Amazon
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
How can I make extraction reliable in production?
Reliability comes from controlling inputs and validating outputs, not from choosing a model once and ignoring the result.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minute- Validate before upload: check extension, size, page count, encryption, and whether the file is actually readable. Reject or remediate password-protected PDFs before consuming an analysis request.
- Route by document type: use a domain prebuilt model for supported invoices, receipts, W-2s, or IDs; route variable business documents to custom neural extraction; reserve template models for stable forms.
- Set review thresholds: use confidence and field-level rules to decide when a person must verify a value. Keep page references so the reviewer can jump directly to the source.
- Make polling durable: persist the operation identifier and status. A worker restart should resume polling rather than submit a duplicate analysis.
- Plan for quotas: monitor request volume, apply exponential backoff for throttling, and use a queue to smooth bursts. Check the service-limits table again before a major scale-up.
- Version your contract: store the model ID, SDK package, and API version with each normalized record. This makes a later reprocessing run explainable.
What are the most common failure modes?
The response contains text but no tables
Verify that you selected prebuilt-layout rather than prebuilt-read, and that the PDF’s visual table is actually represented as a table. For key-value relationships, enable features=keyValuePairs in v4.0; key-value extraction is not implied by plain OCR.
Only part of a large file appears
Check the service tier and the file type. F0 processes only the first two pages and accepts files up to 4 MB, while paid S0 raises the analysis-file limit to 500 MB and supports PDFs and TIFFs up to 2,000 pages.
Fields are inaccurate after a form redesign
A template model depends on stable visual placement. If the layout now varies, retrain or move to a custom neural model, and include representative examples rather than relying on the old template.
Requests are rejected or throttled
Inspect file size, encryption, and quotas first. Then use the current service-limits guidance for your API version and tier, queue work, and retry transient throttling with backoff.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →What is the practical decision path?
For a one-off or exploratory OCR task, begin with prebuilt-read. For a general PDF where tables, checkboxes, and geometry matter, choose prebuilt-layout and enable key-value extraction when labels and values are needed. For a supported business domain, use its prebuilt model. When your documents are proprietary and their layouts vary, train a custom neural model; when the form is visually fixed, a custom template can be sufficient. If one file mixes types, classify and split it before extraction.
Also popular on Amazon
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
That path keeps the simplest model in front of the problem while preserving an upgrade route. Start in F0 for learning within its 500-page monthly allowance, then verify file limits, quotas, confidence behavior, and version compatibility before moving a production workload to S0.
Frequently Asked Questions
Can the SDK analyze a document from a URL instead of uploading bytes?
Yes. An analysis request can reference a PDF URL or provide a file stream. Whichever input method you choose, validate that the service can retrieve the file and that the document meets the size, page, and password requirements before polling the operation.
Does v4.0 classify Office files as well as PDFs?
Yes. The v4.0 custom classifier supports Office document classification in addition to mixed-document workflows. You can use classification to separate document types before sending each segment to its own extraction model.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
How many examples are needed to begin a custom extraction model?
Microsoft says custom extraction can start with five examples of the same form or document type. Those examples should still reflect real production variation; the minimum is a starting point, not a promise of accuracy.
Why keep page numbers and confidence after I have converted the result to JSON?
They let an operator verify a questionable value against the source page and let your application route low-confidence fields for review. Removing that provenance makes later corrections and audits substantially harder.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

