Sign In

@file-viewer/ppt

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package version was removed
This package version has been unpublished, mostly likely due to security reasons

@file-viewer/ppt

Professional browser preview for PowerPoint 97-2003 (.ppt) files, independently developed by Flyfish.

unpublished
npmnpm
Version
0.1.3
Version published
Maintainers
1
Created
Source

@file-viewer/ppt

Professional browser preview for classic PowerPoint .ppt files.

npm version format license

English | 简体中文

English

A professional classic PowerPoint preview engine

@file-viewer/ppt is Flyfish's independently developed browser preview engine for the PowerPoint 97–2003 binary (.ppt) format. It reads the original document structure and renders slides directly in the browser—without Microsoft Office, LibreOffice, or a server-side format-conversion service.

The engine is designed for file preview platforms, document systems, archives, intranets, SaaS products, and web applications that need reliable access to traditional PowerPoint documents.

Why Flyfish PPT Viewer

  • Purpose-built for .ppt — Parses the classic PowerPoint binary format directly instead of converting it through another office suite.
  • Professional document fidelity — Reconstructs slide dimensions, masters, backgrounds, text styles, shapes, pictures, colors, transforms, and stacking order from the source document.
  • Browser-native — Uses modern browser capabilities, ESM, WebAssembly, and first-class TypeScript declarations with no runtime dependencies.
  • Private by design — Documents can be parsed and rendered inside the browser; no third-party conversion service is required.
  • Integration-ready — Produces complete-presentation and single-slide HTML plus a structured TypeScript model for custom viewer interfaces.

Rendering coverage

  • Slide size, master inheritance, backgrounds, color schemes, and layer order
  • Paragraph and character formatting, fonts, font sizes, emphasis, bullets, indentation, alignment, and line spacing
  • OfficeArt shapes, grouped shapes, rotation, flipping, fills, gradients, and outlines
  • Common bitmap resources and traditional Office image records, including WMF and EMF where supported by the browser rendering path
  • Presentation, slide, notes, media-reference, and document metadata models
  • Synchronous rendering for small inputs and asynchronous rendering for richer shape and image processing

Format scope

This package previews the binary PowerPoint 97–2003 .ppt format. It does not parse the XML-based .pptx format.

Installation

npm install @file-viewer/ppt

Quick start

<input id="ppt-file" type="file" accept=".ppt,application/vnd.ms-powerpoint">
<div id="viewer"></div>
import { loadPptViewer } from '@file-viewer/ppt';

const input = document.querySelector('#ppt-file');
const container = document.querySelector('#viewer');

input.addEventListener('change', async () => {
  const file = input.files?.[0];
  if (!file) return;

  const viewer = await loadPptViewer();
  const presentation = await viewer.parsePpt(await file.arrayBuffer(), {
    base64Pictures: true
  });

  container.innerHTML =
    `<style>${viewer.defaultPptViewerCss()}</style>${presentation.html}`;
});

The asynchronous parsePpt() path is recommended for normal browser use. parsePptSync() is also available for small documents and controlled workflows.

Core API

APIPurpose
loadPptViewer()Loads and verifies the browser runtime
parsePpt()Parses a .ppt file asynchronously and returns the presentation model
parsePptSync()Parses a .ppt file synchronously
renderPresentationToHtmlAsync()Renders a complete presentation to HTML
renderSlideToHtmlAsync()Renders one slide to HTML
defaultPptViewerCss()Returns the viewer's production-ready base styles
getPptPackageManifest()Returns public package and edition metadata

All public APIs include TypeScript declarations.

Browser and deployment requirements

  • A modern browser with ES modules, WebAssembly, Web Crypto, and Blob URL support
  • Static hosting or a bundler capable of serving package assets next to the ESM entry
  • The application/wasm MIME type for .wasm assets
  • If a Content Security Policy is enabled, permission for the package's local assets and Blob module execution
  • Normal HTTP or HTTPS hosting; the public edition does not restrict origin

Compatibility notes

Classic PowerPoint files may contain host-dependent fonts, OLE objects, ActiveX controls, macros, or media behaviors that browsers cannot execute. The viewer uses controlled fallbacks for unsupported objects. Final appearance can also vary when a document's original fonts are unavailable on the client device.

Editions and licensing

EditionPermitted useWatermarkOrigin
Public npm editionIndividual personal, non-commercial, non-organizational useMandatory Flyfish ViewerAny normal HTTP/HTTPS origin
Commercial editionLicensed company, organization, customer project, intranet, SaaS, OEM, or production useAvailable without the public watermark according to the purchased licenseAccording to the commercial agreement

Commercial use requires a purchased license. Any use by or for a company, organization, government body, school, nonprofit, team, employer, customer, or client—including internal evaluation—is commercial use.

The public npm edition always displays the Flyfish Viewer watermark. Removing, hiding, covering, replacing, or bypassing it is prohibited. The package is proprietary software and is not licensed under Apache-2.0. See LICENSE for the binding terms.

Purchase a commercial license from the Flyfish Shop.

简体中文

专业传统 PPT 浏览器预览引擎

@file-viewer/ppt 是 Flyfish 独立研发的专业传统 PPT 预览引擎,专门处理 PowerPoint 97–2003 二进制 .ppt 格式。引擎直接读取原始文档结构并在浏览器中 完成幻灯片渲染,无需安装 Microsoft Office、LibreOffice,也不依赖服务端格式 转换服务。

产品适用于文件预览平台、文档管理系统、档案系统、企业内网、SaaS 产品以及需要 兼容传统 PowerPoint 文档的 Web 应用。

产品优势

  • 专注传统 .ppt:直接解析 PowerPoint 二进制格式,不通过其他 Office 软件进行中间转换。
  • 专业文档还原:从原始文档重建页面尺寸、母版、背景、文字样式、形状、 图片、颜色、旋转变换和图层顺序。
  • 浏览器原生集成:基于现代浏览器、ESM 和 WebAssembly,提供完整 TypeScript 类型,且没有运行时依赖。
  • 文档数据更可控:解析与渲染可在浏览器内完成,不要求把文件上传到第三方 转换服务。
  • 便于产品集成:既可输出完整演示文稿或单页 HTML,也可获得结构化 TypeScript 数据模型,用于定制预览界面。

主要还原能力

  • 幻灯片尺寸、母版继承、背景、配色方案和图层顺序
  • 段落与字符样式、字体、字号、粗斜体、项目符号、缩进、对齐和行距
  • OfficeArt 形状、组合形状、旋转、翻转、填充、渐变和边框
  • 常见位图资源,以及浏览器渲染链路支持的 WMF、EMF 等传统 Office 图片记录
  • 演示文稿、幻灯片、备注、媒体引用和文档元数据模型
  • 面向小文件的同步处理,以及适合复杂形状和图片处理的异步渲染

格式范围

本包专门预览 PowerPoint 97–2003 二进制 .ppt 文件,不解析 XML 格式的 .pptx 文件。

安装

npm install @file-viewer/ppt

快速开始

<input id="ppt-file" type="file" accept=".ppt,application/vnd.ms-powerpoint">
<div id="viewer"></div>
import { loadPptViewer } from '@file-viewer/ppt';

const input = document.querySelector('#ppt-file');
const container = document.querySelector('#viewer');

input.addEventListener('change', async () => {
  const file = input.files?.[0];
  if (!file) return;

  const viewer = await loadPptViewer();
  const presentation = await viewer.parsePpt(await file.arrayBuffer(), {
    base64Pictures: true
  });

  container.innerHTML =
    `<style>${viewer.defaultPptViewerCss()}</style>${presentation.html}`;
});

浏览器环境推荐使用异步 parsePpt();小文件或受控流程也可以使用 parsePptSync()

核心 API

API用途
loadPptViewer()加载并校验浏览器运行时
parsePpt()异步解析 .ppt 并返回演示文稿模型
parsePptSync()同步解析 .ppt 文件
renderPresentationToHtmlAsync()将完整演示文稿渲染为 HTML
renderSlideToHtmlAsync()将单页幻灯片渲染为 HTML
defaultPptViewerCss()返回可直接使用的预览基础样式
getPptPackageManifest()返回公开的包与版本信息

所有公开 API 均提供 TypeScript 类型声明。

浏览器与部署要求

  • 支持 ES Modules、WebAssembly、Web Crypto 和 Blob URL 的现代浏览器
  • 能将包内资源与 ESM 入口一起发布的静态服务器或前端构建工具
  • .wasm 文件配置 application/wasm MIME 类型
  • 启用 CSP 时,允许加载包内本地资源和执行 Blob 模块
  • 使用正常 HTTP 或 HTTPS 部署;公网版不限制 origin

兼容性说明

传统 PPT 可能包含依赖宿主环境的字体、OLE 对象、ActiveX 控件、宏或媒体行为, 这些内容无法在浏览器中直接执行。预览器会对不支持的对象采用可控降级策略。 如果客户端缺少文档原始字体,最终显示效果也可能因字体替代而存在差异。

版本与授权

版本允许用途水印Origin
公网 npm 版自然人个人、非商业、非组织用途强制显示 Flyfish Viewer任意正常 HTTP/HTTPS origin
商业版已授权的公司、组织、客户项目、内网、SaaS、OEM 或生产用途按所购授权提供无公网水印版本按商业协议执行

任何商业用途均需购买授权。 公司、组织、政府、学校、非营利机构、团队、 雇主、客户或委托项目的使用,包括内部评估,均属于商业用途。

公网 npm 版始终显示 Flyfish Viewer 水印,禁止删除、隐藏、遮挡、替换或绕过 水印。本包属于专有软件,不适用 Apache-2.0。具有法律约束力的完整条款见 LICENSE

商业授权请前往 Flyfish 商店购买。

产品链接

Keywords

powerpoint

FAQs

Package last updated on 16 Jul 2026

Related posts