Documentation
¶
Overview ¶
Package ps opens PostScript and EPS files.
A document gives its pages: an interpreter of PostScript Level 2, with the parts of Level 3 that files use, runs the program and draws each page onto the display list (D29). A PostScript file gives one page for each showpage. An EPS file gives one page, the size of its bounding box.
A document also gives the previews that an EPS file carries (D11): the TIFF image of the binary header of a DOS EPS file, and the bitmap of an EPSI file, between %%BeginPreview and %%EndPreview. A document also says its title, its author, its creator and its date, from its DSC comments.
Index ¶
- Variables
- type Document
- func (d *Document) Close() error
- func (d *Document) Describe(context.Context) (ivy.Info, error)
- func (d *Document) Page(ctx context.Context, n int) (ivy.Page, error)
- func (d *Document) PageCount(ctx context.Context) (int, error)
- func (d *Document) Previews(context.Context) iter.Seq2[ivy.Preview, error]
- type Option
Constants ¶
This section is empty.
Variables ¶
var Format = ivy.Format{ Name: "ps", Mimes: []string{ "application/postscript", "application/eps", "application/x-eps", "image/eps", "image/x-eps", }, Exts: []string{"ps", "eps", "epsi", "epsf", "ept"}, 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 PostScript or EPS file.
func Open ¶
Open opens a PostScript or an EPS file. It returns an error that wraps ivy.ErrFormat if src is neither.
func (*Document) Describe ¶
Describe satisfies the ivy.Describer interface. It gives the title, the author, the creator and the date of the DSC comments.
Directories
¶
| Path | Synopsis |
|---|---|
|
internal
|
|
|
graphics
Package graphics is the imaging model of PostScript (D29): the graphics state, the paths, the painting, the colors, the images, the patterns, the shadings, the fonts and the pages.
|
Package graphics is the imaging model of PostScript (D29): the graphics state, the paths, the painting, the colors, the images, the patterns, the shadings, the fonts and the pages. |
|
interp
Package interp is the language of PostScript: the scanner, the objects, the stacks, the virtual memory, and the operators that do not draw (D29).
|
Package interp is the language of PostScript: the scanner, the objects, the stacks, the virtual memory, and the operators that do not draw (D29). |