GroupDocs.Parser for Python via .NET Overview

What is GroupDocs.Parser?

GroupDocs.Parser for Python via .NET is a native Python library that extracts text, formatted text, tables, images, metadata, hyperlinks and annotations from PDF, Word, Excel, PowerPoint, OpenDocument, 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. It runs entirely on-premise, requires no Microsoft Office installation, and ships as a pre-built wheel for Windows, Linux, and macOS.

Typical uses include:

  • AI and search pipelines — feed the plain or Markdown text of PDFs, Office files and emails into a search index, a RAG pipeline or an LLM.
  • Data extraction — pull the tables out of reports into rows and cells, and read invoice numbers, dates and totals with a template.
  • Content migration — export the text, images and metadata of a document archive to another system.
  • Document review — collect the comments reviewers left in Word, PDF and PowerPoint files, with their authors and pages.
  • Inventory and triage — read file types, page counts and document properties across a folder, archives and email attachments included.

Key Capabilities

CapabilityDescription
Text extractionExtract the text of a document or one page, in accurate or fast raw mode, with OCR for scanned pages and images.
Formatted textGet HTML, Markdown or plain text that keeps headings, lists, tables and emphasis.
SearchSearch the text by keyword or regular expression, with the text around each hit.
Text structure and areasRead the document’s structure as XML, and text areas with their coordinates and style.
TablesExtract tables from PDF, Word, spreadsheet and presentation pages, cell by cell.
ImagesExtract the images of a document, a page or a page area, and save them in their own format or another.
HyperlinksExtract the hyperlinks of a document, a page or a page area.
MetadataRead document properties such as title, author and dates.
AnnotationsRead comments and notes with their author, time and page.
TemplatesParse documents by template to read fields and tables from documents that share a layout, such as invoices.
ContainersWork with ZIP archives, email attachments and PDF portfolios as with ordinary documents.
Document inspectionRead the file type, page count and size of a document without parsing it.
StreamsLoad documents from file-like objects, handy for cloud blobs and HTTP bodies.
Logging and callbacksReceive the engine’s log messages and decide which external resources a document may load, with Python functions or objects.
Command lineExtract text, metadata, images and annotations with the groupdocs-parser command, without writing Python code.
On-premiseNo cloud calls, no Microsoft Office install, no network traffic. See System Requirements.

Quick Example

Extract the text of a document with just a few lines of code:

from groupdocs.parser import Parser

def quick_example():
    # Open the document and extract its text
    with Parser("./sample.pdf") as parser:
        text = parser.get_text()

        # get_text() returns None for a format without text extraction
        if text is None:
            print("Text extraction isn't supported for this format")
        else:
            print(text)

if __name__ == "__main__":
    quick_example()

sample.pdf is the sample file used in this example. Click here to download it.

Investor relations


Annual Report 2025  |  Port Ellery
Annual Report 2025


1. Overview
Harbor Lane Provisions supplies specialty food to 1,265 independent grocers, cafes and restaurants from its
Quayside warehouse in Port Ellery. In 2025 net revenue grew 15.1% to $21.4 million, driven by the Autumn
[TRUNCATED]

Download full output

To keep the headings, lists and tables of a document, extract its text as Markdown:

from groupdocs.parser import Parser
from groupdocs.parser.options import FormattedTextMode, FormattedTextOptions

def extract_markdown():
    # Open the document and extract its text as Markdown
    with Parser("./sample.docx") as parser:
        options = FormattedTextOptions(FormattedTextMode.MARKDOWN)
        markdown = parser.get_formatted_text(options)

        if markdown is None:
            print("Formatted text extraction isn't supported for this format")
        else:
            print(markdown)

if __name__ == "__main__":
    extract_markdown()

sample.docx is the sample file used in this example. Click here to download it.

**Supply Agreement**

Harbor Lane Provisions and Northwind Coffee Roasters

# **1. Parties**

**Buyer:** Harbor Lane Provisions, 18 Quayside Road, Port Ellery, represented by Lena Park, Procurement Lead.

**Supplier:** Northwind Coffee Roasters, 4 Roastery Lane, Millbrook, represented by Alex Chen.

[TRUNCATED]

Download full output

Where to next

  1. Install the package — Installation walks through PyPI and offline wheel installation for Windows, Linux, and macOS.
  2. Extract your first text — Quick Start Guide extracts text, metadata and tables in five minutes.
  3. Explore the examples — How to Run Examples clones the runnable repository and runs every documented scenario locally or in Docker.
  4. Use it in depth — the Developer Guide covers text, tables, images, metadata, annotations, templates and containers in every supported format.
  5. Licensing — Licensing and Evaluation explains evaluation mode and how to apply a license.
Close
Loading

Analyzing your prompt, please hold on...

An error occurred while retrieving the results. Please refresh the page and try again.