UniPDF Go Library Documentation

repository·master·Indexed 25 days ago

https://github.com/unidoc/unipdf

A professional-grade PDF library for the Go programming language used for creating, reading, processing, and manipulating PDF documents. It provides functionality for page manipulation, text and image extraction, form creation, security and digital signing, and PDF optimization. The library is organized into packages including core, model, creator, extractor, and common.

Tokens
567
Snippets
1
Records
4
Agent score
35%

What's inside UniPDF

  1. Overview of UniPDF features

    master

    UniPDF is a comprehensive PDF library for Go that supports a wide range of PDF manipulation and processing tasks, including:

    • Creation & Reporting: Create PDF reports, tables, styled paragraphs, and invoices.
    • Page Manipulation: Merge, split, rotate, and reorder pages; perform advanced layouts like '4-up' (4 pages on 1).
    • Extraction: Extract text (with size, position, and formatting), images (with coordinates), and tabular data (PDF to CSV).
    • Images: Add images to pages or convert images to PDF.
    • Forms: Create, fill, flatten, and merge forms (including FDF merging).
    • Security: Unlock/remove passwords from PDF files, protect files with passwords, and perform digital signing and validation.
    • Optimization: Compress and optimize PDF files.
    • Advanced Decoding: Supports CCITTFaxDecode and JBIG2 decoding.

    For concrete implementation details, refer to the unipdf-examples repository.

  2. Overview of UniPDF major packages

    master

    UniPDF is a comprehensive PDF library for Go designed for generating, processing, and modifying PDF files. The library is organized into several major functional packages:

    • common: Contains shared types like Logger and utilities for license validation.
    • core: Handles primitive PDF object types, file reading I/O, and parsing of primitive objects.
    • model: Provides a structured representation of PDF primitive types. It includes a reader and writer for processing PDF files at a medium-to-high level interface (requires knowledge of the PDF format).
    • creator: A high-level package for creating new PDFs or modifying existing ones. It supports template loading, adding text/images, and generating graphical reports without requiring deep knowledge of the PDF specification.
    • extractor: A simplified interface for quickly extracting content from PDFs, currently focused on textual content.