pub

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package pub opens the publications of Microsoft Publisher, .pub files, for their previews.

A publication is a Compound File, which the package cfb of magic reads. The package gives its thumbnail and its properties, from the stream "\x05SummaryInformation", and no pages (D5). It draws a thumbnail in EMF or WMF with internal/metafile.

Index

Constants

This section is empty.

Variables

View Source
var Format = ivy.Format{
	Name:  "pub",
	Mimes: []string{"application/vnd.ms-publisher", "application/x-mspublisher"},
	Exts:  []string{"pub"},
	Open: func(ctx context.Context, src ivy.Source, cfg ivy.Config) (ivy.Document, error) {
		return Open(ctx, src, WithConfig(cfg))
	},
}

Format describes the package for the registry of a program.

Functions

This section is empty.

Types

type Document

type Document struct {
	// contains filtered or unexported fields
}

Document is an open Publisher file.

func Open

func Open(ctx context.Context, src ivy.Source, opts ...Option) (d *Document, err error)

Open opens a Publisher file. It returns an error that wraps ivy.ErrFormat if src is not a Compound File with the storage Quill or the stream Contents of Publisher.

func (*Document) Close

func (d *Document) Close() error

Close satisfies the ivy.Document interface.

func (*Document) Describe

func (d *Document) Describe(ctx context.Context) (ivy.Info, error)

Describe satisfies the ivy.Describer interface. It returns the properties of the summary information.

func (*Document) Previews

func (d *Document) Previews(ctx context.Context) iter.Seq2[ivy.Preview, error]

Previews satisfies the ivy.Previewer interface. It lists the thumbnail of the summary information.

type Option

type Option func(*options)

Option is an option of Open.

func WithConfig

func WithConfig(cfg ivy.Config) Option

WithConfig sets the configuration that every format shares.

Jump to

Keyboard shortcuts

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