converter

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package converter is the registry of the input formats that convert into BDF documents, with what their converters have in common: options, format detection and page selection.

The converters themselves are its subpackages (converter/pdf, converter/ai, converter/psd, converter/pptx, converter/xlsx, converter/csv, converter/parquet, converter/docx, converter/visio, converter/idml, converter/drawio, converter/dxf, converter/jww, converter/sxf, converter/cgm, converter/hpgl, converter/gerber, converter/emf, converter/tiff, converter/image, converter/audio, converter/html, converter/markdown, converter/epub, converter/mml, converter/midi, converter/musicxml, converter/font). Each registers its format when it is imported, so a program supports the formats whose packages it links in:

import _ "github.com/shibukawa/bdf/converter/pdf"  // PDF only
import _ "github.com/shibukawa/bdf/converter/all"  // every format

What the Office converters share is in converter/internal: ooxml (OPC packages and their XML) with ooxml/drawingml (shapes, text, tables, charts), fontset (fonts for text layout and their embedding), canvas (objects under construction), metafile (EMF/WMF pictures), isobmff (the boxes of MP4 and HEIF files: AVIF images, M4A audio) and linebreak (line breaking rules); the Word, HTML, Markdown and EPUB converters share the layout engine wordproc (and the last three webdoc, which parses HTML and XHTML), the CAD converters and HP-GL/2 share cad (drawings plotted onto pages), and the music converters share music (scores engraved in staff notation, with the music the viewer plays).

Password-protected inputs open with Options.Password. Encrypted Office documents are decrypted here (converter/internal/offcrypto), before their format is detected; PDF passwords are handled by converter/pdf.

Index

Constants

View Source
const (
	DefaultTableRows  = 1 << 20
	DefaultTableBytes = 64 << 20
)

Limits of the tables the converters store beside the drawing (docs/spec.md §4.6): the rows of a CSV file, a Parquet file as it is, or a sheet. A larger one is left out, with a warning, unless the data parameter says "all".

View Source
const ChartDataParamUsage = "none: the values of charts are not stored as tables the document holds beside its drawing (bdf tables)"

ChartDataParamUsage describes the data parameter of the formats whose tables are the values of their charts.

View Source
const DataParamUsage = "" /* 126-byte string literal not displayed */

DataParamUsage describes the data parameter.

View Source
const MaxRefSize = 256 << 20

MaxRefSize bounds the files ReadRef reads.

Variables

View Source
var (
	ErrUnknownFormat    = errors.New("unknown input format")
	ErrPasswordRequired = errors.New("the input is encrypted and needs a password")
	ErrWrongPassword    = errors.New("the password does not open the input")
)

Errors of Convert and CheckPassword; test for them with errors.Is.

Functions

func CheckPassword

func CheckPassword(r io.ReaderAt, size int64, password string) (protected bool, err error)

CheckPassword reports whether an input needs a password to open, and checks password against it without converting it: nil when the input opens with password (or needs none), ErrPasswordRequired when it needs one and password is empty, ErrWrongPassword when password does not open it. A server can call it when the file is uploaded and answer at once.

func DataParam added in v0.2.0

func DataParam(v string) (string, error)

DataParam reads the data parameter of the formats that store their values as a table: "" (the default: up to the limits), "none" or "all".

func OpenFile added in v0.2.0

func OpenFile[R any](path string, convert func(r io.ReaderAt, size int64) (R, error)) (R, error)

OpenFile opens the file at path for a converter's ConvertFile: convert is called with the file and its size, and the file is closed after it.

func Register

func Register(f *Format)

Register makes a format available. It panics when the name is taken or the format cannot detect or convert.

func TableFits added in v0.2.0

func TableFits(mode string, rows int64, size int) bool

TableFits reports whether a table of rows rows and size bytes is stored under the data parameter's mode.

Types

type FileMap

type FileMap map[string][]byte

FileMap is a file system of files in memory, by name (Options.Files): a server lists the files uploaded with an input.

opts.Files = converter.FileMap{"power.kicad_sch": power, "io.kicad_sch": io}

Names are slash-separated paths; the directories they imply are listed too.

func (FileMap) Open

func (m FileMap) Open(name string) (fs.File, error)

Open implements fs.FS.

type Format

type Format struct {
	// Name identifies the format ("pdf", "pptx", "emf").
	Name string
	// Description names the format for people ("PowerPoint presentation").
	Description string
	// Extensions are the usual file name extensions, with the dot.
	Extensions []string
	// Refines names the format this one is a special case of, as an
	// Illustrator file is a PDF: detection asks it before that format.
	Refines string
	// Guess marks a format whose Detect is a heuristic that other formats'
	// signatures should win over (CSV: text whose lines have the same
	// number of separators): detection asks it after the other formats,
	// and a file name with another format's extension overrides it.
	Guess bool
	// Params are the format-specific options it reads from Options.Params.
	Params []Param
	// Files describes the other files an input of the format refers to and
	// that it reads from Options.Files and Options.Dir ("" when it reads
	// none).
	Files string
	// Detect reports whether an input is in the format; head holds its
	// first bytes (up to 1 KiB).
	Detect func(head []byte, r io.ReaderAt, size int64) bool
	// Convert converts an input.
	Convert func(r io.ReaderAt, size int64, opts *Options) (*Result, error)
	// CheckPassword, for formats with their own encryption, reports
	// whether an input needs a password to open and checks password
	// against it (see the package's CheckPassword).
	CheckPassword func(r io.ReaderAt, size int64, password string) (protected bool, err error)
	// Stream, for formats that can convert a page at a time, starts such a
	// conversion (see OpenStream).
	Stream func(r io.ReaderAt, size int64, opts *Options) (Stream, error)
}

Format is an input format. Converter packages register theirs in init.

func Detect

func Detect(r io.ReaderAt, size int64) *Format

Detect returns the registered format of an input, or nil when no format recognizes it. Formats that refine another are asked first, formats that guess last.

func DetectFile

func DetectFile(path string) (*Format, error)

DetectFile is Detect for a file path, with the file's extension for the inputs no format recognizes by their content (see Options.FileName).

func Formats

func Formats() []*Format

Formats returns the registered formats by name.

func Lookup

func Lookup(name string) *Format

Lookup returns the registered format with the name, or nil.

type Options

type Options struct {
	// Title overrides the document title.
	Title string
	// Pages selects 1-based pages (or slides, or sheets); nil converts all
	// of them.
	Pages Pages
	// Images controls whether raster images are re-encoded (see imgconv),
	// and the resolution cap (MaxDPI, MaxPixels) that image inputs such as
	// TIFF pages are scaled down to. The zero value keeps images as they
	// are, capped at imgconv.DefaultMaxDPI and imgconv.DefaultMaxPixels.
	Images imgconv.Options

	// FontFS holds fonts (.ttf, .otf, .ttc and .otc files) that are not in
	// the local file system, such as fonts embedded in the program or
	// fetched over the network; it is searched before FontDirs. It is
	// scanned on each conversion, reading the files with ReadAt when they
	// have it, and the files of the faces used are then read whole.
	FontFS fs.FS
	// FontDirs are searched for fonts before the system font directories.
	FontDirs []string
	// NoSystemFonts restricts font lookup to FontFS and FontDirs.
	NoSystemFonts bool
	// SystemFonts refers to fonts by family name instead of embedding them.
	SystemFonts bool
	// EmbedFonts embeds the fonts of the formats that refer to them by name
	// unless told otherwise: HTML, Markdown and EPUB, whose text is left to
	// the viewer's fonts as a web page's is.
	EmbedFonts bool

	// NoSubset embeds whole fonts instead of the glyphs in use.
	NoSubset bool
	// NoWOFF2 stores embedded fonts as TrueType/OpenType instead of WOFF2.
	NoWOFF2 bool
	// IgnoreFSType embeds fonts whose OS/2 fsType forbids embedding or
	// subsetting. Set it only when you hold the rights to embed the fonts.
	IgnoreFSType bool
	// NoTextIndex skips building the text index part.
	NoTextIndex bool
	// Params holds format-specific options by name (see Format.Params).
	Params map[string]string
	// Password opens an encrypted input: the open password of an Office
	// document, the user (or owner) password of a PDF. Inputs that open
	// without one ignore it.
	Password string

	// FileName is the input's file name, when it has one (ConvertFile sets
	// it). Its extension tells the format of inputs whose content does not
	// (a CSV file of one line or one column, a Markdown document, an HTML
	// fragment), and formats that name what they convert after the file use
	// it: a CSV file's sheet.
	FileName string
	// Dir is the directory that relative references of the input resolve
	// in (the images of HTML and Markdown documents, the sheets of a KiCad
	// schematic); "" reads no files beside the input. ConvertFile sets it
	// to the input's directory. References and symlinks must stay within
	// this directory. Local resource files are unavailable in TinyGo.
	Dir string
	// Files holds the files an input refers to, for an input that is not
	// read from a directory: a server passes the files uploaded with it
	// (the sheets of a hierarchical KiCad schematic and its project file),
	// as a FileMap or any file system. Names are paths relative to the
	// input's directory, with slashes ("power.kicad_sch",
	// "sub/io.kicad_sch"); a reference that no name matches takes the file
	// of the same base name, when there is one. Files are looked for here
	// first, then in Dir. The formats that read them say so (Format.Files).
	Files fs.FS
	// Warn receives non-fatal problems; when nil they are collected in
	// Result.Warnings.
	Warn func(msg string)
}

Options are the conversion settings; each format uses those that apply to it and ignores the others.

func (*Options) BoolParam

func (o *Options) BoolParam(name string) (bool, error)

BoolParam reads a format-specific option that is a boolean ("" is false).

func (*Options) Param

func (o *Options) Param(name string) string

Param returns a format-specific option ("" when it is not set).

func (*Options) ReadRef

func (o *Options) ReadRef(from, rel string) ([]byte, string, error)

ReadRef reads a file an input refers to. rel is the reference as the input writes it, relative to the directory of the file that makes it: from, a slash path relative to the input's directory ("" for the input itself). It looks in o.Files and then in o.Dir, and in Files also by the base name of rel when no file has its path. It returns the contents and the file's path relative to the input's directory (slash-separated), for the references the file makes in turn. Absolute references are not read; in Dir, references and symlinks must stay within the directory, while in Files a reference outside them matches by base name only.

type PageSpan

type PageSpan struct{ From, To int }

PageSpan is the pages From to To. To 0 is an open end: up to the last page. A single page n is PageSpan{n, n}.

type Pages

type Pages []PageSpan

Pages selects 1-based pages (or slides, or sheets) as ranges, in the order given; nil selects all of them. A selection can end with "the last page" without knowing how many there are: each converter expands it with Numbers once it has read the input.

func PageList

func PageList(pages ...int) Pages

PageList selects single pages, in the order given.

func ParsePages

func ParsePages(spec string) (Pages, error)

ParsePages parses a selection such as "1-3,5,8-": page numbers and ranges separated by commas. A range without a start begins at page 1, one without an end runs to the last page. Pages are numbered from 1. An empty spec selects every page (nil).

func (Pages) Numbers

func (p Pages) Numbers(count int) []int

Numbers returns the page numbers a selection names in an input of count pages, in the order given; nil when p is nil. Open ranges stop at the last page. Numbers past the last page are kept for the converter to report (or skip), but no more of them than that takes: a closed range reaching past the last page keeps only the first page after it, and an open range starting past the last page keeps its start.

func (Pages) String

func (p Pages) String() string

String formats the selection as ParsePages reads it.

type Param

type Param struct {
	Name  string
	Usage string
}

Param is a format-specific option.

type Result

type Result struct {
	Doc      *bdf.Document
	Warnings []string
	// Summary describes the result in a line ("5 slide(s), 2 embedded
	// font(s)").
	Summary string
	// Protected reports that the input opened only with Options.Password.
	// Whoever needed the password to read the input should need it to read
	// the document too: encrypt it with the same password (bdf.Lock).
	Protected bool
}

Result is the outcome of a conversion.

func Convert

func Convert(r io.ReaderAt, size int64, name string, opts *Options) (*Result, error)

Convert converts an input in the named format (detected when name is ""). An encrypted Office document is decrypted with opts.Password first.

func ConvertFile

func ConvertFile(path, name string, opts *Options) (*Result, error)

ConvertFile converts a file in the named format (detected when name is "").

type Stream

type Stream interface {
	// Outline returns the document with every view and page, the pages
	// that Page converts sized but without layers.
	Outline() *bdf.Document
	// Pages is the number of pages Page converts: the pages of the first
	// view, or 0 when the input was converted whole and Outline is the
	// whole document.
	Pages() int
	// Page converts page i of the first view (0-based), unless an earlier
	// call did, and returns a document whose only view holds that page,
	// with the parts it needs that no earlier call returned: the reader
	// puts the page in its outline and adds the parts to those it has.
	Page(i int) (*bdf.Document, error)
	// Finish converts the pages no Page call converted and returns the
	// document. The stream is done with.
	Finish() (*Result, error)
}

Stream is a conversion done a page at a time, for a viewer that shows the pages as they are converted and converts first the ones the reader looks at. Outline is the document before any page is converted; each Page call converts a page of the first view and returns what a reader holding the outline and the pages returned before needs to draw it; Finish converts the pages left and returns the document Convert makes. A Stream is not safe for concurrent use.

func OpenStream

func OpenStream(r io.ReaderAt, size int64, name string, opts *Options) (Stream, error)

OpenStream starts a conversion done a page at a time of an input in the named format (detected when name is ""), which it reads as Convert does. An input whose format cannot is converted whole: its stream's Outline is the document, and Pages is 0.

Directories

Path Synopsis
Package ai converts Adobe Illustrator artwork (.ai) into BDF documents, one page per artboard.
Package ai converts Adobe Illustrator artwork (.ai) into BDF documents, one page per artboard.
Package all registers every input format of this module with the converter registry.
Package all registers every input format of this module with the converter registry.
Package audio converts audio files — MP3, AAC (in an MP4 container, as .m4a, or raw as ADTS), FLAC, Ogg Vorbis and Opus, WAV and AIFF — into BDF documents of one page: a card that shows the cover art the file carries (or a placeholder when it has none) across the top, and under it what the tags say: the title, the artists, the album, the other fields in a table, the lyrics and the chapters.
Package audio converts audio files — MP3, AAC (in an MP4 container, as .m4a, or raw as ADTS), FLAC, Ogg Vorbis and Opus, WAV and AIFF — into BDF documents of one page: a card that shows the cover art the file carries (or a placeholder when it has none) across the top, and under it what the tags say: the title, the artists, the album, the other fields in a table, the lyrics and the chapters.
Package cgm converts Computer Graphics Metafiles (CGM, ISO/IEC 8632) into BDF documents: the binary encoding (Part 3), which CAD programs, technical illustration tools and WebCGM write, and the clear text encoding (Part 4), of versions 1 to 4.
Package cgm converts Computer Graphics Metafiles (CGM, ISO/IEC 8632) into BDF documents: the binary encoding (Part 3), which CAD programs, technical illustration tools and WebCGM write, and the clear text encoding (Part 4), of versions 1 to 4.
Package csv converts CSV and TSV files into BDF documents: one sheet view that shows the values the way Excel shows a CSV file it opens (the sheet is laid out and drawn by converter/xlsx; see xlsx.Grid).
Package csv converts CSV and TSV files into BDF documents: one sheet view that shows the values the way Excel shows a CSV file it opens (the sheet is laid out and drawn by converter/xlsx; see xlsx.Grid).
Package docx converts Word documents (.docx) into BDF documents.
Package docx converts Word documents (.docx) into BDF documents.
Package drawio converts draw.io (diagrams.net) diagrams into BDF documents.
Package drawio converts draw.io (diagrams.net) diagrams into BDF documents.
Package dxf converts DXF drawings (AutoCAD's Drawing Exchange Format, text and binary, R12 to 2018) into BDF documents.
Package dxf converts DXF drawings (AutoCAD's Drawing Exchange Format, text and binary, R12 to 2018) into BDF documents.
Package emf converts Windows metafiles (.emf and .wmf) into BDF documents: one page the size of the picture, drawn by replaying the metafile's records (the same replay draws the metafiles pictures of Office documents; see docs/design.md §3.4).
Package emf converts Windows metafiles (.emf and .wmf) into BDF documents: one page the size of the picture, drawn by replaying the metafile's records (the same replay draws the metafiles pictures of Office documents; see docs/design.md §3.4).
Package epub converts EPUB publications (EPUB 3 and EPUB 2) into BDF documents.
Package epub converts EPUB publications (EPUB 3 and EPUB 2) into BDF documents.
Package font shows font files: TrueType and OpenType fonts (.ttf, .otf), collections of them (.ttc, .otc) and web fonts (.woff, .woff2).
Package font shows font files: TrueType and OpenType fonts (.ttf, .otf), collections of them (.ttc, .otc) and web fonts (.woff, .woff2).
Package gerber converts the fabrication data of printed circuit boards into BDF documents: Gerber files (RS-274X, as the Ucamco Gerber Layer Format Specification defines it, with the X2 attributes and the deprecated commands of older files), Excellon drill files, and a zip archive of the files of a board (with its Gerber job file, when it has one).
Package gerber converts the fabrication data of printed circuit boards into BDF documents: Gerber files (RS-274X, as the Ucamco Gerber Layer Format Specification defines it, with the X2 attributes and the deprecated commands of older files), Excellon drill files, and a zip archive of the files of a board (with its Gerber job file, when it has one).
Package hpgl converts HP-GL/2 plot files (.plt) into BDF documents: the vector language of HP plotters and printers, with the HP-GL of older pen plotters and cutters, the PJL job and PCL or HP RTL escape sequences that files printed to a large-format plotter or a PCL printer carry around it, and the raster images of HP RTL.
Package hpgl converts HP-GL/2 plot files (.plt) into BDF documents: the vector language of HP plotters and printers, with the HP-GL of older pen plotters and cutters, the PJL job and PCL or HP RTL escape sequences that files printed to a large-format plotter or a PCL printer carry around it, and the raster images of HP RTL.
Package html converts HTML documents (.html, .xhtml, and web pages saved as MHTML) into BDF documents in reader mode.
Package html converts HTML documents (.html, .xhtml, and web pages saved as MHTML) into BDF documents in reader mode.
Package idml converts InDesign documents saved as IDML (InDesign Markup Language, the XML interchange format InDesign exports and opens) into BDF documents.
Package idml converts InDesign documents saved as IDML (InDesign Markup Language, the XML interchange format InDesign exports and opens) into BDF documents.
Package image converts the images browsers display by themselves (PNG, JPEG, GIF, WebP, AVIF, BMP, ICO and SVG) into BDF documents: one page the size of the image, which draws it.
Package image converts the images browsers display by themselves (PNG, JPEG, GIF, WebP, AVIF, BMP, ICO and SVG) into BDF documents: one page the size of the image, which draws it.
internal
cad
Package cad draws the 2D drawings of CAD formats (DXF, JWW, SXF, CGM) and the plots of HP-GL/2.
Package cad draws the 2D drawings of CAD formats (DXF, JWW, SXF, CGM) and the plots of HP-GL/2.
canvas
Package canvas builds the objects of a document whose text the converter lays out itself.
Package canvas builds the objects of a document whose text the converter lays out itself.
cfb
Package cfb reads Compound File Binary files ([MS-CFB]): the container of legacy Office documents, and of encrypted Office Open XML documents, which keep their encrypted package in a stream of one.
Package cfb reads Compound File Binary files ([MS-CFB]): the container of legacy Office documents, and of encrypted Office Open XML documents, which keep their encrypted package in a stream of one.
cjkcmap
Package cjkcmap holds Adobe's predefined CJK CMaps (the encodings of the Adobe-Japan1, -Japan2, -GB1, -CNS1 and -Korea1 character collections, such as 90ms-RKSJ-H or UniJIS-UCS2-H) and derives CID → Unicode for those collections from their UTF-32 CMaps.
Package cjkcmap holds Adobe's predefined CJK CMaps (the encodings of the Adobe-Japan1, -Japan2, -GB1, -CNS1 and -Korea1 character collections, such as 90ms-RKSJ-H or UniJIS-UCS2-H) and derives CID → Unicode for those collections from their UTF-32 CMaps.
convtest
Package convtest holds what the tests of the converters share: reading the documents they make back, their text, the files of testdata, and the pictures and symbols the tests of forms look for.
Package convtest holds what the tests of the converters share: reading the documents they make back, their text, the files of testdata, and the pictures and symbols the tests of forms look for.
equation
Package equation is the formula engine (internal/mathlayout) for the converters: it lays formulas out with the fonts of a document (fontset.Set), which keeps the characters they draw for the embedded subsets, and draws them into BDF objects as text.
Package equation is the formula engine (internal/mathlayout) for the converters: it lays formulas out with the fonts of a document (fontset.Set), which keeps the characters they draw for the embedded subsets, and draws them into BDF objects as text.
fontset
Package fontset picks the fonts that lay out the text of a document being converted, measures the characters with them, and embeds the faces in use as subsets of those characters.
Package fontset picks the fonts that lay out the text of a document being converted, measures the characters with them, and embeds the faces in use as subsets of those characters.
formbox
Package formbox draws the values of the fields of a form in their places on pages: what the fillers of forms whose fields have places share (the form of a PDF, a template of pdfme).
Package formbox draws the values of the fields of a form in their places on pages: what the fillers of forms whose fields have places share (the form of a PDF, a template of pdfme).
hpglsniff
Package hpglsniff recognizes HP-GL and HP-GL/2 plot files, which have no signature: a bare plot file is a sequence of two-letter instructions ("IN;SP1;PA0,0;PD1000,0;"), and a plot sent to a printer or a large-format plotter is wrapped in a PJL job with PCL or HP RTL escape sequences around the HP-GL/2 and the raster data.
Package hpglsniff recognizes HP-GL and HP-GL/2 plot files, which have no signature: a bare plot file is a sequence of two-letter instructions ("IN;SP1;PA0,0;PD1000,0;"), and a plot sent to a printer or a large-format plotter is wrapped in a PJL job with PCL or HP RTL escape sequences around the HP-GL/2 and the raster data.
isobmff
Package isobmff reads the boxes of the ISO base media file format (ISO/IEC 14496-12): the container of AVIF and HEIF images, of MP4 and M4A audio, and of MP4 and QuickTime video.
Package isobmff reads the boxes of the ISO base media file format (ISO/IEC 14496-12): the container of AVIF and HEIF images, of MP4 and M4A audio, and of MP4 and QuickTime video.
jbig2
Package jbig2 decodes JBIG2 bi-level images (ITU-T T.88) in the form PDF embeds them with the JBIG2Decode filter: the sequential organisation without the file header, optionally preceded by a stream of global segments.
Package jbig2 decodes JBIG2 bi-level images (ITU-T T.88) in the form PDF embeds them with the JBIG2Decode filter: the sequential organisation without the file header, optionally preceded by a stream of global segments.
jpx
Package jpx decodes JPEG 2000 images (ITU-T T.800 | ISO/IEC 15444-1): bare codestreams and JP2/JPX files, the data of the JPXDecode filter of PDF.
Package jpx decodes JPEG 2000 images (ITU-T T.800 | ISO/IEC 15444-1): bare codestreams and JP2/JPX files, the data of the JPXDecode filter of PDF.
linebreak
Package linebreak holds the line breaking rules of the converters that lay text out themselves (Office documents): the simple rules Office applies.
Package linebreak holds the line breaking rules of the converters that lay text out themselves (Office documents): the simple rules Office applies.
localfile
Package localfile opens document resources within a directory.
Package localfile opens document resources within a directory.
metafile
Package metafile replays Windows metafiles (EMF and WMF), the vector pictures Office documents embed, into BDF objects.
Package metafile replays Windows metafiles (EMF and WMF), the vector pictures Office documents embed, into BDF objects.
music
Package music engraves scores: it lays out music as staff notation on pages of a BDF document and stores what the viewer plays (a Standard MIDI File and the cues that tie its time to places on the pages, docs/spec.md §4.4).
Package music engraves scores: it lays out music as staff notation on pages of a BDF document and stores what the viewer plays (a Standard MIDI File and the cues that tie its time to places on the pages, docs/spec.md §4.4).
music/smufl
Package smufl holds the music symbols the score engraver draws: glyphs of Bravura, the reference font of the Standard Music Font Layout (SMuFL), with their metrics and anchors, and the font's engraving defaults.
Package smufl holds the music symbols the score engraver draws: glyphs of Bravura, the reference font of the Standard Music Font Layout (SMuFL), with their metrics and anchors, and the font's engraving defaults.
offcrypto
Package offcrypto decrypts password-protected Office Open XML documents ([MS-OFFCRYPTO]).
Package offcrypto decrypts password-protected Office Open XML documents ([MS-OFFCRYPTO]).
ooxml
Package ooxml reads Office Open XML documents (.pptx, .docx, .xlsx): the parts of their Open Packaging Conventions container (ECMA-376 Part 2), the relationships between the parts, and part XML as generic element trees.
Package ooxml reads Office Open XML documents (.pptx, .docx, .xlsx): the parts of their Open Packaging Conventions container (ECMA-376 Part 2), the relationships between the parts, and part XML as generic element trees.
ooxml/drawingml
Package drawingml draws DrawingML (ECMA-376 Part 1 §20, §21): the shapes, pictures, text bodies, tables and charts that Office documents share, with their themes and color maps.
Package drawingml draws DrawingML (ECMA-376 Part 1 §20, §21): the shapes, pictures, text bodies, tables and charts that Office documents share, with their themes and color maps.
tiff
Package tiff reads TIFF files: the image file directories (IFDs) of a multi-page file, their tags and their pixels (docs/design.md §3.15).
Package tiff reads TIFF files: the image file directories (IFDs) of a multi-page file, their tags and their pixels (docs/design.md §3.15).
webdoc
Package webdoc reads web documents for the converters that lay them out in reader mode (converter/html, converter/markdown, converter/epub): HTML and XHTML into the node tree of golang.org/x/net/html, svg elements into SVG documents of their own, and data: URLs.
Package webdoc reads web documents for the converters that lay them out in reader mode (converter/html, converter/markdown, converter/epub): HTML and XHTML into the node tree of golang.org/x/net/html, svg elements into SVG documents of their own, and data: URLs.
wordproc
Package wordproc lays out word-processing documents for the converters of Word documents (converter/docx) and of HTML and Markdown (converter/html, converter/markdown).
Package wordproc lays out word-processing documents for the converters of Word documents (converter/docx) and of HTML and Markdown (converter/html, converter/markdown).
xmp
Package xmp reads the Dublin Core of XMP metadata packets (ISO 16684-1), as image and design files embed them, and of other RDF/XML, such as the metadata of SVG documents (docs/spec.md §4.3).
Package xmp reads the Dublin Core of XMP metadata packets (ISO 16684-1), as image and design files embed them, and of other RDF/XML, such as the metadata of SVG documents (docs/spec.md §4.3).
ziputil
Package ziputil opens zip archives (Office packages, EPUB publications, archives of KiCad, Gerber and SXF files) with the inflate of klauspost/compress, which reads a third faster than the standard library's and gives the same bytes.
Package ziputil opens zip archives (Office packages, EPUB publications, archives of KiCad, Gerber and SXF files) with the inflate of klauspost/compress, which reads a third faster than the standard library's and gives the same bytes.
Package jww converts the drawings of Jw_cad (.jww) into BDF documents.
Package jww converts the drawings of Jw_cad (.jww) into BDF documents.
Package kicad converts KiCad schematics (.kicad_sch) and boards (.kicad_pcb) of KiCad 6 and later, and zip archives of their projects, into BDF documents.
Package kicad converts KiCad schematics (.kicad_sch) and boards (.kicad_pcb) of KiCad 6 and later, and zip archives of their projects, into BDF documents.
Package markdown converts Markdown documents into BDF documents.
Package markdown converts Markdown documents into BDF documents.
Package midi reads Standard MIDI Files: the .mid (.midi, .smf) files of sequencers and notation programs, karaoke files (.kar) and RIFF MIDI files (.rmi).
Package midi reads Standard MIDI Files: the .mid (.midi, .smf) files of sequencers and notation programs, karaoke files (.kar) and RIFF MIDI files (.rmi).
Package mml reads MML (Music Macro Language), the text that chip music and game music are written in, into a music.Performance that converter/internal/music writes as staff notation and plays.
Package mml reads MML (Music Macro Language), the text that chip music and game music are written in, into a music.Performance that converter/internal/music writes as staff notation and plays.
Package musicxml reads MusicXML scores (.musicxml, .xml, and compressed .mxl) into the music engine's Score, which converter/internal/music engraves as staff notation on pages with the music played by the viewer.
Package musicxml reads MusicXML scores (.musicxml, .xml, and compressed .mxl) into the music engine's Score, which converter/internal/music engraves as staff notation on pages with the music played by the viewer.
Package parquet converts Apache Parquet files into BDF documents: one sheet view of the table, the column names bold and frozen at the top with a gray row of their types under them, and the values the way data tools show them (the sheet is laid out and drawn by converter/xlsx; see xlsx.Grid).
Package parquet converts Apache Parquet files into BDF documents: one sheet view of the table, the column names bold and frozen at the top with a gray row of their types under them, and the values the way data tools show them (the sheet is laid out and drawn by converter/xlsx; see xlsx.Grid).
Package pdf converts PDF files into BDF documents.
Package pdf converts PDF files into BDF documents.
Package pdfform fills the interactive form of a PDF (its AcroForm) with data, as a template of a form: the file is the template, its fields are what the data has values for, and the filled form is a BDF document of its pages with the values drawn in the places of the fields.
Package pdfform fills the interactive form of a PDF (its AcroForm) with data, as a template of a form: the file is the template, its fields are what the data has values for, and the filled form is a BDF document of its pages with the values drawn in the places of the fields.
Package pdfme fills templates of pdfme (https://pdfme.com) with data: a template made with the designer of pdfme (a JSON file: a base PDF or a blank page, and the fields on its pages with their places) is filled as the generator of pdfme fills it, into a BDF document.
Package pdfme fills templates of pdfme (https://pdfme.com) with data: a template made with the designer of pdfme (a JSON file: a base PDF or a blank page, and the fields on its pages with their places) is filled as the generator of pdfme fills it, into a BDF document.
Package pptx converts PowerPoint presentations (.pptx) into BDF documents.
Package pptx converts PowerPoint presentations (.pptx) into BDF documents.
Package psd converts Photoshop documents (.psd, and .psb, the large document format) into BDF documents: the image as Photoshop composited it, one page per artboard.
Package psd converts Photoshop documents (.psd, and .psb, the large document format) into BDF documents: the image as Photoshop composited it, one page per artboard.
Package sxf converts SXF drawings, the CAD data exchange format of the electronic deliveries of Japanese public works (電子納品), into BDF documents: the STEP files (.p21, and .p2z, a P21 file in a zip) and the feature comment files (.sfc) of SXF Ver.2 to Ver.3.1.
Package sxf converts SXF drawings, the CAD data exchange format of the electronic deliveries of Japanese public works (電子納品), into BDF documents: the STEP files (.p21, and .p2z, a P21 file in a zip) and the feature comment files (.sfc) of SXF Ver.2 to Ver.3.1.
Package textform fills templates of plain text with data: forms whose characters are on a grid of columns and lines, as dot matrix printers print continuous forms and slips in their text mode, and as receipt printers print receipts.
Package textform fills templates of plain text with data: forms whose characters are on a grid of columns and lines, as dot matrix printers print continuous forms and slips in their text mode, and as receipt printers print receipts.
Package tiff converts TIFF images into BDF documents: each page of the file (each image of the IFD chain that is not a reduced-resolution copy or a mask) becomes a page of a fixed view, drawn by one image the size of the page (see docs/design.md §3.15).
Package tiff converts TIFF images into BDF documents: each page of the file (each image of the IFD chain that is not a reduced-resolution copy or a mask) becomes a page of a fixed view, drawn by one image the size of the page (see docs/design.md §3.15).
Package visio converts Visio drawings into BDF documents: the packages of Visio 2013 and later (.vsdx, .vsdm, .vstx, .vstm).
Package visio converts Visio drawings into BDF documents: the packages of Visio 2013 and later (.vsdx, .vsdm, .vstx, .vstm).
Package xlsx converts Excel workbooks (.xlsx) into BDF documents.
Package xlsx converts Excel workbooks (.xlsx) into BDF documents.

Jump to

Keyboard shortcuts

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