npm.io
1.0.1 • Published 7 months ago

@datagrok/eps-viewer

Licence
—
Version
1.0.1
Deps
0
Vulns
0
Weekly
0
Stars
72

EpsViewer

EpsViewer is a package for the Datagrok platform that previews Encapsulated PostScript (.eps) files in the file browser.

The viewer handles two common flavors of EPS:

  • ASCII EPS — rendered by parsing a subset of PostScript onto an HTML canvas via the vendored UDOC interpreter.
  • DOS EPS binary (Adobe Illustrator and similar) — the embedded TIFF preview is extracted from the binary header and decoded with utif2.

Complex, real-world Illustrator files typically fall into the second category, so their embedded preview is used instead of attempting to interpret the full PostScript program.