This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /guides/python/downloads.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. Python SDK sample downloads

Download our ready-to-use Python code samples for document processing, editing, extraction, and conversion tasks. Each sample includes complete source code and shows how to implement common document workflows in your applications.

Document Editor samples

These samples demonstrate how to manipulate PDF documents programmatically, including adding pages, editing metadata, and merging files.

Add annotations to PDF

Add various annotations to PDF documents, including text highlights, notes, comments, and shapes. This is useful for document review workflows and collaborative editing.

Download sample.

Add custom pages to PDFs

Add custom pages with specific dimensions to existing PDF documents. This is useful for inserting signature pages, cover pages, or blank pages for notes.

Download sample.

Edit PDF metadata

Modify document properties like title, author, subject, and keywords.

Download sample.

Merge a PDF into another PDF

Combine multiple PDF documents into a single file.

Download sample.

Manage PDF page order

Reorder, remove, or insert pages in a PDF document.

Download sample.

Annotation samples

Add annotations to PDFs for review, markup, and redaction workflows.

Add annotations to PDF

Add multiple annotation types in one workflow.

Download sample.

Add sticky note annotations

Add comment notes for review and collaboration.

Download sample.

Add text markup annotations

Highlight, underline, strike out, and squiggle text.

Download sample.

Add free text annotations

Add editable text boxes as annotations.

Download sample.

Add shape annotations

Add rectangles, ellipses, and other shapes.

Download sample.

Add stamp annotations

Apply stamp-style annotations for approvals or status.

Download sample.

Create clickable links to URLs or document pages.

Download sample.

Add redaction annotations

Mark content for permanent redaction.

Download sample.

Form field samples

Create, edit, and fill interactive PDF form fields.

Add form fields to a PDF

Create text fields, checkboxes, dropdowns, and signature fields.

Download sample.

Fill PDF form fields

Populate form fields programmatically for automation workflows.

Download sample.

Edit PDF form fields

Update field properties and configuration.

Download sample.

Detect and add form fields

Detect form field regions and add matching AcroForm fields automatically.

Download sample.

Digital signature samples

Add visible and invisible signatures with advanced signing options.

Add a visible signature to a PDF

Place a visible signature field and sign the document.

Download sample.

Add an invisible signature to a PDF

Apply cryptographic signatures without visual appearance.

Download sample.

Advanced digital signatures

Use PAdES-T and stronger hash algorithms for compliance.

Download sample.

Data extraction samples

These samples demonstrate how to extract data from images using advanced recognition technologies.

Extract data from images using ICR

Extract structured data from images using intelligent content recognition (ICR). This uses local AI models for offline document understanding, and detecting tables, equations, and semantic elements without external API calls.

Download sample.

Speed up first ICR by downloading requirements

Predownload ICR resources to reduce first-run latency.

Download sample.

Extract data from images using VLM

Use vision language models to extract structured data from images.

Download sample.

Extract data from images using OCR

Extract text from images using optical character recognition (OCR). This is optimized for speed and high-throughput scenarios with fast text extraction and minimal overhead.

Download sample.

Apply OCR to PDF

Add an invisible text layer to scanned documents to make them searchable and selectable.

Download sample.

Apply OCR to a PDF page

Run OCR on a single page without reprocessing the rest of the document.

Download sample.

Extract form fields from image

Detect form fields in image-based documents and export their locations and types as structured JSON.

Download sample.

Extract structured data

Extract schema-shaped JSON data from documents using AI-backed structured extraction.

Download sample.

JSON data extraction

Extract structured JSON data from PDFs for storage, API workflows, and analytics pipelines.

Download sample.

PDF to text

Extract layout-aware text from PDF documents.

Download sample.

Read text from image

Extract text from images using OCR.

Download sample.

Read text from image in multiple languages

Extract text from images containing multiple languages.

Download sample.

AI document understanding samples

Generate descriptions and insights from images using AI models.

Describe images with Claude

Generate image descriptions with Claude models.

Download sample.

Describe images with local AI

Generate image descriptions with local AI models.

Download sample.

Describe images with OpenAI

Generate image descriptions with OpenAI models.

Download sample.

Label form fields with VLM

Assign human-readable semantic labels to detected form fields using a vision language model.

Download sample.

Document conversion samples

These samples show how to convert between different document formats, including Office documents, PDFs, and HTML.

Word document to PDF

Convert Microsoft Word documents (.docx) to PDF format.

Download sample.

Word document to PDF including comments

Convert Word documents to PDF while preserving comments and annotations.

Download sample.

Word document to PDF/UA

Convert Word documents to PDF/UA (universal accessibility)-compliant format. This is useful for legal documents, government forms, and accessibility compliance.

Download sample.

Excel document to PDF

Convert Microsoft Excel spreadsheets to PDF format.

Download sample.

PowerPoint document to PDF

Convert Microsoft PowerPoint presentations to PDF format.

Download sample.

CAD to PDF

Convert CAD drawings such as DWG and DXF files to PDF.

Download sample.

Email to PDF

Convert MSG and EML email messages to PDF for compliance, legal review, or records.

Download sample.

HTML to PDF

Convert HTML content to fixed-layout PDF documents.

Download sample.

Markdown to PDF

Convert Markdown files to PDF format.

Download sample.

PDF to Word document

Convert PDF files back to editable Microsoft Word documents.

Download sample.

PDF to Excel document

Extract and convert PDF content to Microsoft Excel format.

Download sample.

PDF to PowerPoint document

Convert PDF files to Microsoft PowerPoint presentations.

Download sample.

PDF to HTML

Convert PDF documents to HTML format for web display.

Download sample.

PDF to image

Convert PDF documents to image formats for previews, thumbnails, or image-based processing.

Download sample.

PDF pages to images

Export each page in a multipage PDF as a separate image file.

Download sample.

PDF to Markdown

Convert PDF documents to editable Markdown content.

Download sample.

PDF to PDF/A

Convert PDF documents to archival PDF/A format.

Download sample.

PDF to PDF/UA

Convert PDF documents to PDF/UA for accessibility compliance.

Download sample.

PDF to PDFA

Convert PDF documents to PDF/A for compliance workflows and long-term archiving.

Download sample.

Template processing samples

These samples demonstrate how to generate documents from templates with dynamic content and convert them to accessible formats.

Word template generation

Generate documents from Word templates with dynamic content. This is useful for creating contracts, reports, and personalized documents.

Download sample.

Word template to PDF/UA

Convert Word templates to PDF/UA-compliant documents. This is useful for accessible template-based document generation.

Download sample.

Setup, deployment, and troubleshooting samples

These samples cover SDK setup, runtime configuration, and production deployment considerations.

License activation

Activate Nutrient Python SDK with your license key before calling SDK APIs.

Download sample.

Error handling

Use structured error handling to validate inputs, catch SDK exceptions, and return clear messages.

Download sample.

Headless modes Google Chrome

Run packaged Docker samples for Chrome-backed conversions with Python SDK.

Download sample.

What’s next

After exploring these samples: