For a library for processing digital documents, the strongest matches are pdfcpu/pdfcpu (pdfcpu is a Go library and CLI purpose-built for), pymupdf/pymupdf (PyMuPDF is a high-performance Python library that programmatically creates) and mwilliamson/mammoth.js (mammoth). pdfcrafttool/pdfcraft and hopding/pdf-lib round out the shortlist. Each is ranked by relevance to your query, popularity and recent activity.
Find the best document processing libraries for your project. Compare top-rated tools by features, activity, and language to pick the right one.
pdfcpu is a Go PDF processing library and command-line interface designed for programmatically manipulating, optimizing, and validating PDF files. It provides a toolkit for document content modification and structural management. The project distinguishes itself as an optimization tool and layout engine, capable of reducing file sizes and improving loading speeds by streamlining internal structures. It also functions as a security manager, providing password-based encryption, decryption, and digital signature verification. Its capability surface includes page management for merging, splittin
pdfcpu is a Go library and CLI purpose-built for programmatic PDF manipulation (merge, split, encrypt, validate, optimize), which is exactly the kind of document processing library you're after, though it focuses solely on PDFs and does not handle Office documents or format conversion.
PyMuPDF is a comprehensive PDF manipulation library and document analysis tool. It serves as a text extraction tool, OCR engine, and image converter, providing a programmatic interface to edit, merge, split, and optimize PDF and Office documents. The project distinguishes itself through high-performance capabilities, including the use of C-bindings for low-level manipulation and parallelized page processing to accelerate workloads. It provides specialized conversion paths, such as transforming PDF content into Markdown for retrieval-augmented generation and large language model pipelines. It
PyMuPDF is a high-performance Python library that programmatically creates, edits, converts, and processes PDF and Office documents, with a comprehensive API covering extraction, OCR, conversion, and batch operations — exactly what you need.
mammoth.js converts DOCX and PDF files to HTML with a programmatic JavaScript API, making it a useful document conversion tool for your needs, though it lacks template processing and batch processing features.
Pdfcraft is a containerized service for self-managed PDF processing, editing, and conversion. It provides a toolkit for document manipulation, a multi-format converter, and OCR software to transform scanned documents into searchable and editable text. The project features a visual, node-based workflow editor that allows users to build automated pipelines by chaining together various PDF conversion and optimization operations. The service covers a broad range of capabilities, including document management for merging and splitting files, format conversion between PDFs and office documents or
Pdfcraft is a containerized service that provides PDF editing, conversion to/from Office formats, OCR, and batch processing via visual workflows, which aligns well with the intent for a programmatic document manipulation tool.
pdf-lib is a JavaScript PDF manipulation library used for creating, modifying, and editing PDF documents programmatically. It functions as a cross-runtime tool compatible with Node, Browser, Deno, and mobile JavaScript environments. The library provides a programmatic interface for document editing and form generation. It supports building interactive PDF forms, populating existing fields with custom data, and flattening forms into static content. Its broader capabilities include generating new documents from scratch, rearranging or copying pages between files, and managing document metadata
This is a JavaScript library focused specifically on programmatic PDF creation and editing, which fits the intent for PDF manipulation but does not support Office documents or format conversion as required.
This project is an open-source office suite that provides a collection of productivity applications for word processing, spreadsheets, presentations, and databases. It implements the Open Document Format standard to ensure interoperability between different office productivity tools. The suite includes a specialized formula equation editor for mathematical formatting, a vector graphics editor for scalable images, and a relational database manager for organizing structured data. The project covers broad functional domains including text document generation, spreadsheet management, presentatio
LibreOffice is a full office suite that you can use programmatically via its UNO API and headless command-line mode to create, edit, convert, and batch-process documents (including PDF and Office formats) with template support, exactly matching your need for a document manipulation tool.
Marker is an LLM-powered document parser and OCR pipeline designed to convert PDFs and unstructured files into structured markdown, JSON, and HTML. It functions as a data preprocessor that transforms complex documents into machine-readable formats while preserving tables, equations, and layout structures. The system utilizes large language models to refine OCR accuracy, clean mathematical notation, and merge fragmented tables across multiple pages. It employs model-based layout analysis to predict block types and bounding boxes, ensuring a more precise conversion of document elements. Capabi
Marker is a programmatic document parser and OCR pipeline that converts PDFs and unstructured files to structured formats (Markdown, JSON, HTML) with batch processing support, but it does not offer broader document creation, editing, or Office document handling.
Stirling-PDF is a self-hosted document processing suite designed for secure, private file management. It functions as a comprehensive transformation engine that executes complex operations—such as merging, splitting, converting, and redacting documents—directly on the host machine. The platform provides both a browser-based interface for interactive editing and a programmatic, API-first architecture that allows for the automation of document workflows through standard HTTP requests. The project distinguishes itself through its focus on private, infrastructure-agnostic deployment and granular
Stirling-PDF is a self-hosted document-processing suite with a programmatic API and batch automation for PDF tasks like merging, splitting, and converting, which fits the search for a document manipulation tool—though it focuses on PDFs and does not explicitly cover Office document support or template processing.
Surya is a document processing platform designed to transform unstructured files into structured, machine-readable data. It provides a comprehensive suite of tools for text recognition, layout analysis, and reading order detection, enabling the conversion of PDFs and images into formats such as JSON, HTML, or markdown. The platform is built to handle complex document workflows, offering capabilities for data extraction, document segmentation, and automated form completion. The platform distinguishes itself through a robust pipeline-based architecture that allows users to chain analysis tasks
Surya is a document processing platform that converts PDFs and images into structured data via OCR and layout analysis, offering a programmatic pipeline API and batch processing, which fits the search for a document manipulation tool, though it focuses on extraction and conversion rather than editing or Office document support.
This library is a toolkit for processing, manipulating, and inspecting PDF documents within the Rust programming language. It provides programmatic access to the internal structure of files, enabling the extraction of data and the modification of document content. The project utilizes a strongly-typed system to map complex document objects into structured data models. It supports the parsing of existing files through lazy-loading and stream-based decoding, which allows for the retrieval of text, metadata, and images. The library also facilitates the creation of updated document versions by re
This Rust library lets you read, manipulate, and write PDF files programmatically, making it a document manipulation library focused on PDFs — it covers your programmatic API need but lacks Office document support and format conversion.
| Repository | Stars | Language | License | Last push |
|---|---|---|---|---|
| pdfcpu/pdfcpu | 8.7K | Go | Apache-2.0 | |
| pymupdf/pymupdf | 9.1K | Python | agpl-3.0 | |
| mwilliamson/mammoth.js | 6.1K | JavaScript | bsd-2-clause | |
| pdfcrafttool/pdfcraft | 3.1K | JavaScript | agpl-3.0 | |
| hopding/pdf-lib | 8.5K | TypeScript | MIT | |
| libreoffice/core | 4K | C++ | GPL-3.0 | |
| vikparuchuri/marker | 36.2K | Python | GPL-3.0 | |
| stirling-tools/stirling-pdf | 81.1K | TypeScript | NOASSERTION | |
| datalab-to/surya | 20.9K | Python | Apache-2.0 | |
| pdf-rs/pdf | 1.7K | Rust | MIT |