Documentation ¶
Overview ¶
Package unipdf is a comprehensive PDF library for Go (golang). The library has advanced capabilities for generating, processing and modifying PDFs. UniPDF is written and supported by the owners of the FoxyUtils.com website, where the library is used to power many of the PDF services offered.
Getting More Information ¶
Check out the Getting Started and Example sections, which showcase how to install unipdf and provide numerous examples of using unipdf to generate, process or modify PDF files. https://unidoc.io/examples/getting_started/
The GoDoc for unipdf provides a detailed breakdown of the API and documentation for packages, types and methods. https://godoc.org/github.com/nareshrajaram/unipdf
Overview of Major Packages ¶
The API is composed of a few major packages:
common: Provides common shared types such as Logger and utilities to check license validity.
core: The core package defines the primitive PDF object types and handles the file reading I/O and parsing the primitive objects.
model: The model package builds on the core package, to represent the PDF as a structured model of the PDF primitive types. It has a reader and a writer to read and process a PDF file based on the structured model. This serves as a basis to perform a number of numerous tasks and can be used to work with a PDF in a medium to high level interface, although it does require an understanding of the PDF format and structure.
creator: The PDF creator makes it easy to create new PDFs or modify existing PDFs. It can also enable loading a template PDF, adding text/images and generating an output PDF. It can be used to add text, images, and generate text and graphical reports. It is designed with simplicity in mind, with the goal of making it easy to create reports without needing any knowledge about the PDF format or specifications.
extractor: Package extractor is used for quickly extracting PDF content through a simple interface. Currently offers functionality for extracting textual content.
Directories ¶
Path | Synopsis |
---|---|
Package annotator provides an interface for creating annotations with appearance streams.
|
Package annotator provides an interface for creating annotations with appearance streams. |
Package common contains common properties used by the subpackages.
|
Package common contains common properties used by the subpackages. |
Package contentstream provides functionality for parsing and creating content streams for PDF files.
|
Package contentstream provides functionality for parsing and creating content streams for PDF files. |
draw
Package draw has handy features for defining paths which can be used to draw content on a PDF page.
|
Package draw has handy features for defining paths which can be used to draw content on a PDF page. |
Package core defines and implements the primitive PDF object types in golang, and provides functionality for parsing those from a PDF file stream.
|
Package core defines and implements the primitive PDF object types in golang, and provides functionality for parsing those from a PDF file stream. |
Package creator is used for quickly generating pages and content with a simple interface.
|
Package creator is used for quickly generating pages and content with a simple interface. |
Package extractor is used for quickly extracting PDF content through a simple interface.
|
Package extractor is used for quickly extracting PDF content through a simple interface. |
Package fdf provides support for loading form field data from Form Field Data (FDF) files.
|
Package fdf provides support for loading form field data from Form Field Data (FDF) files. |
Package fjson provides support for loading PDF form field data from JSON data/files.
|
Package fjson provides support for loading PDF form field data from JSON data/files. |
internal
|
|
ccittfax
Package ccittfax defines and implements the Group3 and Group4 facsimile (fax) encoding and decoding according to the CCITT recommendations T.4 and T.6.
|
Package ccittfax defines and implements the Group3 and Group4 facsimile (fax) encoding and decoding according to the CCITT recommendations T.4 and T.6. |
endian
Package endian detects the platform specific byte endianness.
|
Package endian detects the platform specific byte endianness. |
jbig2
Package jbig2 provides the jbig2 standard image Encoder and Decoder.
|
Package jbig2 provides the jbig2 standard image Encoder and Decoder. |
jbig2/basic
Package basic contains common structures, slices and maps used within the jbig2 package.
|
Package basic contains common structures, slices and maps used within the jbig2 package. |
jbig2/bitmap
Package bitmap contains the bitmap data container for the binary images used when decoding the jbig2 encoded images.
|
Package bitmap contains the bitmap data container for the binary images used when decoding the jbig2 encoded images. |
jbig2/decoder
Package decoder provides primitives used to decode the jbig2 data stream.
|
Package decoder provides primitives used to decode the jbig2 data stream. |
jbig2/decoder/arithmetic
Package arithmetic contains the jbig2 arithmetic decoder used to decode the jbig2 encoded segments.
|
Package arithmetic contains the jbig2 arithmetic decoder used to decode the jbig2 encoded segments. |
jbig2/decoder/huffman
Package huffman contains jbig2 huffman tables used to decode jbig2 encoded data segments.
|
Package huffman contains jbig2 huffman tables used to decode jbig2 encoded data segments. |
jbig2/decoder/mmr
Package mmr contains the jbig2 mmr decoder used to decode jbig2 encoded data segments.
|
Package mmr contains the jbig2 mmr decoder used to decode jbig2 encoded data segments. |
jbig2/document
Package document provides jbig2 encoding primitives used for encoding and decoding purpose.
|
Package document provides jbig2 encoding primitives used for encoding and decoding purpose. |
jbig2/document/segments
Package segments provides jbig2 segments models used in the jbig2 document decoding process.
|
Package segments provides jbig2 segments models used in the jbig2 document decoding process. |
jbig2/encoder/arithmetic
Package arithmetic provides jbig2 arithmetic encoder definitions.
|
Package arithmetic provides jbig2 arithmetic encoder definitions. |
jbig2/encoder/classer
Package classer contains apache leptonica like implementation of the jbig2 classificator.
|
Package classer contains apache leptonica like implementation of the jbig2 classificator. |
jbig2/errors
Package errors contains error wrappers and creators used for precise error messaging in the jbig2 package.
|
Package errors contains error wrappers and creators used for precise error messaging in the jbig2 package. |
jbig2/reader
Package reader provides the stream readers used by the jbig2 segments decoder.
|
Package reader provides the stream readers used by the jbig2 segments decoder. |
jbig2/tests
Package tests contains the tests and benchmarks for the JBIG2 decoder and encoder.
|
Package tests contains the tests and benchmarks for the JBIG2 decoder and encoder. |
jbig2/writer
Package writer contains the data writer that implements io.Writer, io.ByteWriter and allows to write single bits.
|
Package writer contains the data writer that implements io.Writer, io.ByteWriter and allows to write single bits. |
strutils
Package strutils provides convenient functions for string processing in unidoc internally.
|
Package strutils provides convenient functions for string processing in unidoc internally. |
testutils
Package testutils provides test methods that are not intended to be exported.
|
Package testutils provides test methods that are not intended to be exported. |
textencoding
Package textencoding is used for handling text encoding (char code <-> glyph mapping) in unidoc both for reading and outputing PDF contents.
|
Package textencoding is used for handling text encoding (char code <-> glyph mapping) in unidoc both for reading and outputing PDF contents. |
Package model provides an interface for working with high-level objects (models) in PDF files, including reading and writing documents.
|
Package model provides an interface for working with high-level objects (models) in PDF files, including reading and writing documents. |
internal/fonts
Package fonts is used for internal representation for working with fonts in PDF.
|
Package fonts is used for internal representation for working with fonts in PDF. |
sighandler
Package sighandler implements digital signature handlers for PDF signature validation and signing.
|
Package sighandler implements digital signature handlers for PDF signature validation and signing. |
Package ps implements various functionalities needed for handling Postscript for PDF uses, in particular for PDF function type 4.
|
Package ps implements various functionalities needed for handling Postscript for PDF uses, in particular for PDF function type 4. |