Product Page | Docs | Demos | API Reference | Blog | Free Support | Temporary License
GroupDocs.Parser for Python via .NET is a document parsing API that extracts text, formatted text (HTML, Markdown), images, tables, metadata, hyperlinks, barcodes, annotations and the table of contents from PDF, Word, Excel, PowerPoint, email, eBook, archive and image files, 65+ formats in all. It also searches text, reads document structure, recognizes text in scanned pages (OCR), and pulls fields out of invoices and forms with templates.
Get Started
pip install groupdocs-parser-net
from groupdocs.parser import Parser
with Parser("document.pdf") as parser:
print(parser.get_text())
How It Works
The package is a self-contained Python wheel (~290 MB) that bundles the embedded .NET runtime and everything needed to parse documents: just pip install and start extracting. On Linux the system also needs ICU, fontconfig, the Liberation fonts and libgdiplus, and on macOS mono-libgdiplus (see System Requirements below). The wheel works across Python 3.5-3.14 on Windows, Linux, and macOS 13 or newer (Intel + Apple Silicon); OCR on macOS needs 13.3 or newer.
The first document a process opens takes about 20-30 seconds while the engine loads; documents opened after that take a fraction of a second.
Features
- Text: plain text of a document or one page, in accurate or fast raw mode, with OCR for scanned pages and images.
- Formatted text: HTML, Markdown or plain text that keeps headings, lists, tables and emphasis.
- Tables: extract tables from PDF, Word, spreadsheet and presentation pages, or from page areas you define.
- Images, hyperlinks and barcodes: from whole documents, single pages or rectangular page areas.
- Annotations: comments and notes with their author, time and page, from PDF, Word and PowerPoint files.
- Metadata and structure: document properties, the table of contents, and the document's structure as XML.
- Templates: extract fields and tables from documents that share a layout, such as invoices.
- Containers: iterate ZIP, RAR, 7Z and TAR archives, email attachments and PDF portfolios.
- Cross-Platform: Windows x64, Linux x64, macOS x64/ARM64.
Common Tasks
- Feed the text of PDFs, Office files and emails into search, RAG or LLM pipelines
- Convert documents to Markdown or HTML for downstream processing
- Pull tables out of reports into rows and cells
- Extract all images from a document, or the images on one page
- Read invoice numbers, dates and totals with a template
- Collect review comments and their authors from Word and PDF files
- Recognize text in scanned documents
Supported File Formats
This API supports a broad set of document formats, including:
- Word Processing: DOC, DOCX, DOCM, DOT, DOTX, DOTM, ODT, OTT, RTF, TXT
- Spreadsheets: XLS, XLSX, XLSM, XLSB, XLT, XLTX, XLTM, XLA, XLAM, ODS, OTS, CSV, TSV
- Presentations: PPT, PPTX, PPTM, PPS, PPSX, PPSM, POT, POTX, POTM, ODP, OTP
- PDF: PDF
- Email: EML, EMLX, MSG, PST, OST
- eBook: EPUB, MOBI, AZW3, FB2, CHM
- Markup: HTML, XHTML, MHTML, XML, MD
- Images: JPG, JPEG, PNG, BMP, GIF, TIF, TIFF, JP2
- Archives: ZIP, RAR, 7Z, TAR, GZ, BZ2
- OneNote: ONE
Supports 65+ file formats. FileType.get_supported_file_types() (or groupdocs-parser list-formats) lists them.
For a complete list, see supported formats.
Examples
Extract text
from groupdocs.parser import Parser
with Parser("input.pdf") as parser:
text = parser.get_text()
if text is None:
print("Text extraction isn't supported for this format")
else:
print(text)
get_text() returns a str (one that also answers read_to_end()), or None when the format does not support text extraction. get_text(page_index) extracts one page.
Extract text as Markdown
from groupdocs.parser import Parser
from groupdocs.parser.options import FormattedTextMode, FormattedTextOptions
with Parser("input.docx") as parser:
markdown = parser.get_formatted_text(FormattedTextOptions(FormattedTextMode.MARKDOWN))
print(markdown)
Extract tables
from groupdocs.parser import Parser
with Parser("input.pdf") as parser:
for table in parser.get_tables() or []:
for row in range(table.row_count):
print([table[row, column].text for column in range(table.column_count)])
Extract images
from groupdocs.parser import Parser
with Parser("input.pdf") as parser:
for number, image in enumerate(parser.get_images() or [], 1):
image.save("image-%d%s" % (number, image.file_type.extension))
Read annotations
from groupdocs.parser import Parser
with Parser("reviewed.docx") as parser:
for note in parser.get_annotations() or []:
print(note.page_index + 1, note.annotation_type, note.author_name, note.value.strip())
Get document info and metadata
from groupdocs.parser import Parser
with Parser("input.xlsx") as parser:
info = parser.get_document_info()
print("Format:", info.file_type.file_format, "| pages:", info.page_count, "| size:", info.size)
for item in parser.get_metadata() or []:
print(item.name, "=", item.value)
Load from a stream
import io
from groupdocs.parser import Parser
with open("input.pdf", "rb") as stream:
with Parser(stream) as parser:
print(len(parser.get_text()))
with open("input.pdf", "rb") as f:
data = f.read() # e.g. bytes downloaded from storage
with Parser(io.BytesIO(data)) as parser:
print(parser.get_document_info().file_type.file_format)
Log what the engine does, and control external resources
from groupdocs.parser import Parser
from groupdocs.parser.options import ParserSettings
def log(level, message, exception):
print(level, message)
def skip_remote(args):
# Called for each image an HTML or MHTML page references
args.skipped = args.uri.startswith("http")
settings = ParserSettings(log, None, skip_remote)
with Parser("page.html", settings) as parser:
print(len(parser.get_images() or []))
The logger may also be an object with trace(message), warning(message) and error(message, exception), and the resource handler an object with on_loading(args) or a subclass of ExternalResourceHandler.
Command Line
Installing the wheel also puts groupdocs-parser on PATH (or run python -m groupdocs.parser).
groupdocs-parser text report.pdf # plain text to stdout
groupdocs-parser text report.pdf --page 2 -o page2.txt # one page (pages count from 1), to a UTF-8 file
groupdocs-parser text report.docx --format markdown # markdown or html
groupdocs-parser text scan.pdf --ocr # recognize text in scanned pages
groupdocs-parser text reviewed.docx --include-annotations
groupdocs-parser info report.pdf --json # format, pages, size
groupdocs-parser metadata report.docx # name = value
groupdocs-parser images report.pdf --out images/ # writes image-001.png, ...
groupdocs-parser annotations reviewed.docx --json # comments with page, author and time
groupdocs-parser list-formats # every supported extension and family
groupdocs-parser --license license.lic text protected.pdf --password secret
Exit codes: 0 success, 2 user error (missing file, bad option), 1 engine error or a format that does not support the operation. Every verb and option: Command Line Interface.
AI Agent & LLM Friendly
This package is designed for seamless integration with AI agents, LLMs, and automated code generation tools.
AGENTS.mdin the package - AI coding assistants (Claude Code, Cursor, GitHub Copilot) auto-discover the API surface, usage patterns, and troubleshooting tips from the installed package. Setup per tool: AI agents and LLM integration- MCP server - connect your AI tool to GroupDocs documentation for on-demand API lookups:
{ "mcpServers": { "groupdocs-docs": { "url": "https://docs.groupdocs.com/mcp" } } }
- Machine-readable docs - full documentation available as plain text for RAG and LLM context:
- Single file:
https://docs.groupdocs.com/parser/python-net/llms-full.txt - Per page: append
.mdto any docs URL
- Single file:
Evaluation Mode
The API works without a license in evaluation mode, with these limitations:
- Extracted text stops after about 20 lines and ends with "Evaluation only. Created with GroupDocs.Parser for .NET."
- Only the first 5 metadata items are returned, followed by an evaluation notice.
To remove these limitations, apply a license or request a temporary license:
from groupdocs.parser import License
License().set_license("path/to/license.lic")
Or set the environment variable, which is applied at the first Parser call:
export GROUPDOCS_LIC_PATH="path/to/license.lic"
If that licence cannot be applied (an expired subscription, a licence for another product, a
missing file), every Parser call raises LicenseError with the reason until a licence is
applied. Set GROUPDOCS_LIC_STRICT=0 to run in evaluation mode with a LicenseWarning instead.
Upgrading from 25.12
25.12 was built by an earlier toolchain; 26.10 is a pure-Python package over an embedded .NET 10 runtime. Most 25.12 code runs unchanged: 129 of the 129 Docs snippets that ran on 25.12 run on 26.10.
get_text()andget_formatted_text()still return astr, which now also answersread_to_end().- Preview callbacks are plain functions:
PreviewOptions(create_page_stream, release_page_stream). TheICreatePageStream,IReleasePageStreamandIPreviewPageRenderclasses are gone. - Lists the engine returns support
len()and indexing, and an empty one is false. - Engine errors raise
GroupDocsParserExceptionor one of its subclasses (InvalidPasswordException,CorruptedDocumentException,UnsupportedDocumentFormatException) fromgroupdocs.parser.exceptions. 25.12 raisedRuntimeErrorfor all of them, and these classes do not derive from it, so replaceexcept RuntimeErrorwithexcept GroupDocsParserException. - Assigning a property a class does not have raises
AttributeError, with a "Did you mean" hint. 25.12 stored a Python-only attribute and left the engine setting unchanged. - New in the engine since 25.12: annotations (
get_annotations(),TextOptions.include_annotations), HTML table extraction, OCR for Arabic and Korean, and fasterget_file_info(). - Python 3.14 is supported. There is no 32-bit Windows wheel any more, and the wheels require glibc 2.27 on Linux and macOS 13 on Mac, with macOS 13.3 for OCR (see below).
Troubleshooting
| Issue | Platform | Fix |
|---|---|---|
The process aborts with Couldn't find a valid ICU package, or DOTNET_SYSTEM_GLOBALIZATION_INVARIANT errors |
Linux | Install ICU (apt-get install libicu-dev) and do NOT set this variable |
get_structure() reports merged table cells as separate rows |
Linux | Install the Liberation fonts: apt-get install fonts-liberation |
is not a supported wheel on this platform, No matching distribution found for groupdocs-parser-net, or pip installs 25.12 |
Linux/macOS | The OS is older than the wheel needs (glibc 2.27, macOS 13), or pip is older than 20.3: python -m pip install --upgrade pip. On an Intel Mac, a Python built against an old SDK reports macOS 10.16 - use pip 24.1+ or SYSTEM_VERSION_COMPAT=0 pip install groupdocs-parser-net |
OCR, or text from an image, raises GroupDocsParserException naming Microsoft.ML.OnnxRuntime.NativeMethods and DllNotFoundException |
macOS 13.0-13.2 | OCR's ONNX Runtime library needs macOS 13.3 or newer: update macOS. Everything else works on 13.0 |
XType: com.apple.fonts is not accessible. and XType: XTFontStaticRegistry is enabled. (or XType: Using static font registry.) on stderr |
macOS | Harmless. macOS prints them when a process with no logged-in desktop session, such as a CI runner or a background service, first loads fonts; it then reads the system font folders directly. Nothing to fix |
The first Parser(...) call takes 20-30 seconds |
All | Expected: the engine loads once per process. Reuse the process for many documents |
DllNotFoundException: libgdiplus or The type initializer for 'Gdip' threw an exception |
Linux/macOS | Install libgdiplus: apt-get install libgdiplus / brew install mono-libgdiplus. Presentations need it: page previews, ODP and OTP files, and PowerPoint files with tables or hyperlinks |
An aspose_data folder of about 80 MB appears in the working directory |
All | The first OCR call unpacks the recognition models there (no download; it works offline). Choose the folder before the first OCR call: from groupdocs.parser import Resources then Resources.storage_path = "/path/to/cache" |
TypeError: __init__() - no overload matched for ParserSettings() |
All | ParserSettings takes a logger, an OCR connector or a resource handler; there is no empty one |
System Requirements
- Python 3.5 - 3.14, pip 20.3 or newer
- Windows x64, Linux x64, macOS x64/ARM64 - 64-bit Python only; there is no 32-bit Windows wheel
- Linux: glibc 2.27 or newer (e.g. Ubuntu 18.04+, Debian 10+, RHEL 8+), plus ICU, fontconfig, the Liberation fonts and libgdiplus (
apt-get install libicu-dev libfontconfig1 fonts-liberation libgdiplus). No Microsoft core fonts. - macOS 13 or newer, Intel or Apple Silicon, plus
brew install mono-libgdiplus. OCR (text from scanned pages and images) needs macOS 13.3 or newer: on 13.0-13.2 it raisesGroupDocsParserException, and every other feature works. - libgdiplus serves presentations. Without it, page previews of PowerPoint and OpenDocument presentations fail, and so does everything but metadata in ODP and OTP files and in PPT, PPS and POT files that contain a table.
get_hyperlinks()fails on a PowerPoint file with a table or a hyperlink. Every other format works without it.
More Resources
Also available for other platforms: .NET | Java | Node.js
Product Page | Docs | Demos | API Reference | Blog | Free Support | Temporary License
Metadata
Release files for groupdocs-parser-net 26.10.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| groupdocs_parser_net-26.10.0-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details for groupdocs_parser_net-26.10.0-py3-none-win_amd64.whl |
| groupdocs_parser_net-26.10.0-py3-none-manylinux_2_27_x86_64.whl | Python 3 | none | Linux glibc 2.27+ x86-64 | Details for groupdocs_parser_net-26.10.0-py3-none-manylinux_2_27_x86_64.whl |
| groupdocs_parser_net-26.10.0-py3-none-macosx_13_0_x86_64.whl | Python 3 | none | macOS 13.0+ x86-64 | Details for groupdocs_parser_net-26.10.0-py3-none-macosx_13_0_x86_64.whl |
| groupdocs_parser_net-26.10.0-py3-none-macosx_13_0_arm64.whl | Python 3 | none | macOS 13.0+ ARM64 | Details for groupdocs_parser_net-26.10.0-py3-none-macosx_13_0_arm64.whl |
Total release size: 1.2 GB
Release files / groupdocs_parser_net-26.10.0-py3-none-win_amd64.whl
| Download URL | groupdocs_parser_net-26.10.0-py3-none-win_amd64.whl |
|---|---|
| Size | 299.9 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
4342a216ce8819376749c11488a94b697bc58b8246d813530395d922dd0383bd
|
|
BLAKE2b-256 checksum How to use checksums |
9b48573ba5655dca9febe7de1dff4cf1e69507a0395969a407ef0acf74ef0e20
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|
Release files / groupdocs_parser_net-26.10.0-py3-none-manylinux_2_27_x86_64.whl
| Download URL | groupdocs_parser_net-26.10.0-py3-none-manylinux_2_27_x86_64.whl |
|---|---|
| Size | 302.1 MB |
| Tags | Linux glibc 2.27+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
b9af92922af4cee9a1fe50abddabf8e3950455d8df739fd447fbb29f220675b8
|
|
BLAKE2b-256 checksum How to use checksums |
39bf0062c7cc3a54f4165534a5c7d7d50f8f8c9544fa859f214049d872339664
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|
Release files / groupdocs_parser_net-26.10.0-py3-none-macosx_13_0_x86_64.whl
| Download URL | groupdocs_parser_net-26.10.0-py3-none-macosx_13_0_x86_64.whl |
|---|---|
| Size | 307.4 MB |
| Tags | Python 3 macOS 13.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
31b8adb5e12be4c16a87387bb59ac42e9352cdac3e08f42767787b8b05a0689e
|
|
BLAKE2b-256 checksum How to use checksums |
4061c7d5aa720a5c0195b997ece15d6309e8697f0753a813eb8987e4531482a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|
Release files / groupdocs_parser_net-26.10.0-py3-none-macosx_13_0_arm64.whl
| Download URL | groupdocs_parser_net-26.10.0-py3-none-macosx_13_0_arm64.whl |
|---|---|
| Size | 303.7 MB |
| Tags | Python 3 macOS 13.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
f67ff96a5ad0d31dc4208cb427b3862bdff3741e3beb46fd2ea60887ff891644
|
|
BLAKE2b-256 checksum How to use checksums |
fd2c94e0829cd5552ec0cd551486ce010dce7e779d7d39ad3dd75eef77131369
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|
Security for groupdocs-parser-net 26.10.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.