internal/

directory
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2026 License: MPL-2.0

Directories

Path Synopsis
Package color implements the PDF color spaces (ISO 32000-2 8.6) the engine needs: the device spaces (Gray/RGB/CMYK, matched byte for byte to the oracle's ICC-backed conversions; see convert.go), CalGray/CalRGB (approximated by their device analogs), ICCBased (mapped to the device space with the same component count), Indexed, and Separation/DeviceN with their tint transforms (internal/function).
Package color implements the PDF color spaces (ISO 32000-2 8.6) the engine needs: the device spaces (Gray/RGB/CMYK, matched byte for byte to the oracle's ICC-backed conversions; see convert.go), CalGray/CalRGB (approximated by their device analogs), ICCBased (mapped to the device space with the same component count), Indexed, and Separation/DeviceN with their tint transforms (internal/function).
Package content tokenizes and interprets PDF content streams (ISO 32000-2 8–9), driving a device.Device: path construction and painting, graphics-state management (q/Q/cm, the ExtGState subset below), clipping (W/W*), color operators, form XObject recursion, image XObjects and inline images (decoded by internal/imaging), text objects (fonts via internal/font), shadings and patterns (internal/shading), and transparency — groups, soft masks, and blend modes.
Package content tokenizes and interprets PDF content streams (ISO 32000-2 8–9), driving a device.Device: path construction and painting, graphics-state management (q/Q/cm, the ExtGState subset below), clipping (W/W*), color operators, form XObject recursion, image XObjects and inline images (decoded by internal/imaging), text objects (fonts via internal/font), shadings and patterns (internal/shading), and transparency — groups, soft masks, and blend modes.
Package cos implements the COS layer of a PDF document: the lexer, the object model (null, boolean, integer, real, string, name, array, dictionary, stream, and indirect reference), classic and stream cross-reference parsing with /Prev chains and hybrid files, object streams, a repair scan for files whose cross-reference data is broken or inconsistent, an indirect-reference resolver with a cycle guard, and text-string decoding.
Package cos implements the COS layer of a PDF document: the lexer, the object model (null, boolean, integer, real, string, name, array, dictionary, stream, and indirect reference), classic and stream cross-reference parsing with /Prev chains and hybrid files, object streams, a repair scan for files whose cross-reference data is broken or inconsistent, an indirect-reference resolver with a cycle guard, and text-string decoding.
Package crypt implements the PDF standard security handler (ISO 32000-2 7.6): revisions 2-4 (RC4 and AESV2) and 5-6 (AESV3).
Package crypt implements the PDF standard security handler (ISO 32000-2 7.6): revisions 2-4 (RC4 and AESV2) and 5-6 (AESV3).
Package device defines the seam between the content-stream interpreter (internal/content) and its consumers: the raster device (internal/render) and the structured-text device (internal/stext).
Package device defines the seam between the content-stream interpreter (internal/content) and its consumers: the raster device (internal/render) and the structured-text device (internal/stext).
Package doc implements document-level PDF semantics on top of the COS layer: the page tree (flattened at open into the page list PageCount and Page answer from), encryption setup, page geometry (the effective box and rotation, and the top-left/y-down space derived from them), destinations (explicit arrays and named, via the old-style /Dests dictionary and the /Names name tree), the document outline, link annotations, and page labels.
Package doc implements document-level PDF semantics on top of the COS layer: the page tree (flattened at open into the page list PageCount and Page answer from), encryption setup, page geometry (the effective box and rotation, and the top-left/y-down space derived from them), destinations (explicit arrays and named, via the old-style /Dests dictionary and the /Names name tree), the document outline, link annotations, and page labels.
Package filter implements the non-image PDF stream filters (FlateDecode, LZWDecode, ASCIIHexDecode, ASCII85Decode, and RunLengthDecode), the PNG and TIFF predictor transforms, and bounded chain application.
Package filter implements the non-image PDF stream filters (FlateDecode, LZWDecode, ASCIIHexDecode, ASCII85Decode, and RunLengthDecode), the PNG and TIFF predictor transforms, and bounded chain application.
Package font implements PDF font semantics (ISO 32000-2 9.5–9.10): font-dictionary and descriptor parsing, embedded font programs, encodings, width resolution, and the deterministic substitution of non-embedded fonts from the bundled data (internal/font/data).
Package font implements PDF font semantics (ISO 32000-2 9.5–9.10): font-dictionary and descriptor parsing, embedded font programs, encodings, width resolution, and the deterministic substitution of non-embedded fonts from the bundled data (internal/font/data).
data
Package data holds the embedded font bundle: width tables and built-in encodings compiled from the Adobe Core 14 AFMs, the Adobe Glyph List, and the Liberation fonts used as metric-compatible substitutes for non-embedded fonts.
Package data holds the embedded font bundle: width tables and built-in encodings compiled from the Adobe Core 14 AFMs, the Adobe Glyph List, and the Liberation fonts used as metric-compatible substitutes for non-embedded fonts.
data/gen command
Command gen regenerates the committed contents of internal/font/data (and the generated base-encoding tables in internal/font/encodings_gen.go) from locally downloaded upstream inputs.
Command gen regenerates the committed contents of internal/font/data (and the generated base-encoding tables in internal/font/encodings_gen.go) from locally downloaded upstream inputs.
Package function implements PDF functions (ISO 32000-2 7.10): sampled (type 0), exponential interpolation (type 2), stitching (type 3), and PostScript calculator (type 4) functions.
Package function implements PDF functions (ISO 32000-2 7.10): sampled (type 0), exponential interpolation (type 2), stitching (type 3), and PostScript calculator (type 4) functions.
Package gfx holds the shared geometry types the engine's graphics pipeline is built on: points, rectangles, quads, an affine matrix, paths, and stroke parameters.
Package gfx holds the shared geometry types the engine's graphics pipeline is built on: points, rectangles, quads, an affine matrix, paths, and stroke parameters.
Package imaging decodes PDF image XObjects and inline images (ISO 32000-2 8.9) into the two raster forms internal/render consumes: straight-alpha RGBA pixels for ordinary images, and a one-byte-per-pixel coverage plane for stencil masks (ImageMask true), which the device tints with the current fill paint.
Package imaging decodes PDF image XObjects and inline images (ISO 32000-2 8.9) into the two raster forms internal/render consumes: straight-alpha RGBA pixels for ordinary images, and a one-byte-per-pixel coverage plane for stencil masks (ImageMask true), which the device tints with the current fill paint.
Package jbig2 一个高性能、零依赖的纯 Go 语言 JBIG2 解码器
Package jbig2 一个高性能、零依赖的纯 Go 语言 JBIG2 解码器
jpeg2000
box
j2k
Package j2k decodes and encodes raw JPEG 2000 codestreams (.j2k / .jpc / .j2c), the ISO/IEC 15444-1 (Part 1) entropy-coded data without a JP2 container.
Package j2k decodes and encodes raw JPEG 2000 codestreams (.j2k / .jpc / .j2c), the ISO/IEC 15444-1 (Part 1) entropy-coded data without a JP2 container.
jp2
Package jp2 decodes the JPEG 2000 JP2 file format (.jp2), the ISO/IEC 15444-1 box container that wraps a raw codestream together with image metadata such as the colour space (an enumerated sRGB / grey / sYCC / CMYK value or an embedded ICC profile) and channel definitions.
Package jp2 decodes the JPEG 2000 JP2 file format (.jp2), the ISO/IEC 15444-1 box container that wraps a raw codestream together with image metadata such as the colour space (an enumerated sRGB / grey / sYCC / CMYK value or an embedded ICC profile) and channel definitions.
wavelet
Package wavelet implements reversible (integer) discrete wavelet transforms.
Package wavelet implements reversible (integer) discrete wavelet transforms.
Package render is the raster device: the only package that imports github.com/richardwilkes/canvas (canvas/gpu is never imported, keeping the build cgo- and purego-free).
Package render is the raster device: the only package that imports github.com/richardwilkes/canvas (canvas/gpu is never imported, keeping the build cgo- and purego-free).
Package shading parses PDF shading dictionaries (ISO 32000-2 8.7.4, types 1-7) into a normalized form the raster device can draw without consulting COS objects again: axial and radial shadings carry a sampled color ramp, function-based shadings carry their domain, matrix, and a color-evaluation closure, and the mesh types (4-7) are tessellated at parse time into flat triangles whose color spread is below one 8-bit step.
Package shading parses PDF shading dictionaries (ISO 32000-2 8.7.4, types 1-7) into a normalized form the raster device can draw without consulting COS objects again: axial and radial shadings carry a sampled color ramp, function-based shadings carry their domain, matrix, and a color-evaluation closure, and the mesh types (4-7) are tessellated at parse time into flat triangles whose color spread is below one 8-bit step.
Package stext implements the structured-text device.
Package stext implements the structured-text device.
Package store implements the document-scoped, byte-budgeted resource cache (the fz-store analog): parsed fonts, decoded images, and converted glyph paths register here with byte-size estimates, and least-recently-used entries evict when a New(maxCacheSize) budget would be exceeded.
Package store implements the document-scoped, byte-budgeted resource cache (the fz-store analog): parsed fonts, decoded images, and converted glyph paths register here with byte-size estimates, and least-recently-used entries evict when a New(maxCacheSize) budget would be exceeded.
Package testrand holds the splitmix64 generator the SIMD equivalence tests and benchmarks share.
Package testrand holds the splitmix64 generator the SIMD equivalence tests and benchmarks share.
Package testsupport loads the committed golden files (testfiles/goldens/<name>/truth.json plus rendered PNGs, produced from testfiles/corpus by the oracle module's regen.sh) and provides the comparison helpers the parity tests use.
Package testsupport loads the committed golden files (testfiles/goldens/<name>/truth.json plus rendered PNGs, produced from testfiles/corpus by the oracle module's regen.sh) and provides the comparison helpers the parity tests use.
Package type1 parses Adobe Type 1 font programs (the FontFile stream of a PDF font dictionary): the PFA/PFB container, eexec decryption, the built-in /Encoding, /FontMatrix and /FontBBox from the clear-text portion, and the /Subrs and /CharStrings charstrings (decrypted with r=4330 and their lenIV bytes stripped) from the private portion.
Package type1 parses Adobe Type 1 font programs (the FontFile stream of a PDF font dictionary): the PFA/PFB container, eexec decryption, the built-in /Encoding, /FontMatrix and /FontBBox from the clear-text portion, and the /Subrs and /CharStrings charstrings (decrypted with r=4330 and their lenIV bytes stripped) from the private portion.
Package vecmath holds the arithmetic helpers shared by this module's goexperiment.simd vector kernels.
Package vecmath holds the arithmetic helpers shared by this module's goexperiment.simd vector kernels.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL