Overview of go-pdfium
maingo-pdfium is a fast, multi-threaded, and easy-to-use PDF library for Go applications. It acts as a binding for Google's PDFium C++ library, providing a high-level Go interface to handle complex PDF operations without requiring direct CGO or WebAssembly knowledge.
Key capabilities include:
- Document Management: Loading (from bytes, paths, or
io.ReadSeeker), saving (to bytes, paths, orio.Writer), and metadata extraction. - Rendering: Rendering pages to Go
image.Image(RGBA or Grayscale) using DPI or pixel size, and exporting directly to JPEG or PNG. - Text & Content: Extracting plain or structured text (including position, size, and font info), searching text, and handling bookmarks, links, and annotations.
- Editing: Rotating pages, importing pages, flattening, and form filling.
- Advanced Features: Handling XFA packets, attachments, JavaScript actions, and transformations.