A “Hello, World!” example is often the first step when exploring GroupDocs.Parser for Python via .NET. It serves as a simple test to confirm that your development environment is correctly set up and that the library is functioning as expected.
Overview
GroupDocs.Parser for Python via .NET extracts text, tables, images, metadata and more from documents of various formats. A wide range of supported formats makes it versatile for different use cases.
How to extract text
The following steps demonstrate how to extract the text of a document using GroupDocs.Parser for Python via .NET:
Import the Parser class from groupdocs.parser.
Open a Parser with the path to the sample document.
Call get_text() to extract the text.
Print the result.
Complete example
The example below extracts the text of a four-page PDF report and prints it:
fromgroupdocs.parserimportParserdefhello_world():# Open the document and extract its textwithParser("./sample.pdf")asparser:text=parser.get_text()# get_text() returns None for a format without text extractioniftextisNone:print("Text extraction isn't supported for this format")else:print(text)if__name__=="__main__":hello_world()
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]
get_text() returns the text as a str. To extract one page, pass its index: get_text(0) returns the text of the first page. The first Parser in a process takes 20-30 seconds while the engine loads; documents opened after that take a fraction of a second.
Additional resources
This demo references the GroupDocs.Parser for Python via .NET code samples.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.
On this page
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.