
Security News
White House Authorizes Private Companies to Conduct Offensive Cyber Operations
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.
@file-viewer/ppt
Advanced tools
Professional native WebAssembly canvas viewer for PowerPoint 97-2003 (.ppt) files.
Professional browser preview for PowerPoint 97–2003 (
.ppt), powered by native WebAssembly and Canvas.
@file-viewer/ppt is Flyfish's independently developed preview engine for the
PowerPoint 97–2003 binary (.ppt) format. It reconstructs slides directly in a
modern browser without Microsoft Office, LibreOffice, browser plug-ins, or a
server-side conversion service.
The product is designed for document platforms, archives, knowledge systems, intranets, SaaS applications, and web products that still need dependable access to traditional PowerPoint files.
.ppt understanding — Reads the classic PowerPoint compound-file,
persist-record, text, drawing, and picture structures directly.This package previews PowerPoint 97–2003 binary .ppt files. For XML-based
.pptx files, use a dedicated PPTX viewer.
npm install @file-viewer/ppt
<input id="ppt-file" type="file" accept=".ppt,application/vnd.ms-powerpoint">
<div id="ppt-viewer"></div>
import { createPptViewer } from '@file-viewer/ppt';
const viewer = await createPptViewer();
const input = document.querySelector('#ppt-file');
input.addEventListener('change', async () => {
const file = input.files?.[0];
if (!file) return;
await viewer.mount('#ppt-viewer', await file.arrayBuffer(), {
scale: 1,
pixelRatio: window.devicePixelRatio
});
});
mount() creates one Canvas per slide and renders progressively. No license
file or origin registration is required for the public watermarked edition.
const response = await fetch('/documents/presentation.ppt');
const pptDocument = viewer.open(await response.arrayBuffer());
const canvas = document.querySelector('canvas');
pptDocument.renderSlide(0, canvas, { scale: 1.25 });
console.log(pptDocument.slideCount, pptDocument.width, pptDocument.height);
pptDocument.close();
Close documents when they are no longer needed so their native memory can be released immediately.
| API | Purpose |
|---|---|
createPptViewer() / loadPptViewer() | Loads and verifies the native viewer engine |
viewer.mount(target, input, options) | Renders the complete presentation into Canvas elements |
viewer.open(input) | Opens a .ppt document and returns an opaque document handle |
document.renderSlide(index, canvas, options) | Renders one final RGBA slide frame to Canvas |
document.close() | Releases native document memory |
getPptPackageManifest() | Returns package and edition metadata |
All public APIs include TypeScript declarations. Parsed document models, records, HTML, SVG, drawing command streams, and unwatermarked frames are not part of the public API.
fetch, and Canvas 2Dppt-native.wasm beside index.mjsapplication/wasm MIME type for .wasm assets'wasm-unsafe-eval' where required by the browserTraditional PowerPoint files may contain macros, ActiveX controls, OLE objects, linked media, or host-specific behaviors that browsers cannot execute. These features are treated as non-executable preview content. Font substitution may be used when an original document font is not available in the viewer's embedded fallback set.
| Edition | Permitted use | Watermark | Origin |
|---|---|---|---|
| Public npm edition | Individual personal, non-commercial, non-organizational use | Mandatory Flyfish Viewer on every slide | Any normal HTTP/HTTPS origin |
| Commercial edition | Licensed company, organization, customer project, intranet, SaaS, OEM, or production use | Watermark-free build available according to the purchased agreement | According to the commercial agreement |
Commercial use requires a purchased license. 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 is proprietary software and is not licensed under Apache-2.0. Removing, hiding, covering, replacing, or bypassing the required watermark is prohibited. See LICENSE for the binding terms.
Purchase a commercial license from the Flyfish Shop.
@file-viewer/ppt 是 Flyfish 纯自研的 PowerPoint 97–2003 二进制 .ppt
专业预览引擎。它直接理解传统 PPT 文件结构,并在现代浏览器中重建幻灯片,无需
安装 Microsoft Office、LibreOffice、浏览器插件,也不依赖服务端格式转换。
产品适用于文件预览平台、档案与知识管理系统、企业内网、SaaS 产品,以及仍需 稳定支持传统 PowerPoint 文档的 Web 应用。
.ppt:直接读取复合文件、持久化记录、文字、绘图和图片结构。本包专门预览 PowerPoint 97–2003 二进制 .ppt 文件。XML 格式的 .pptx
应使用专用 PPTX 预览器。
npm install @file-viewer/ppt
<input id="ppt-file" type="file" accept=".ppt,application/vnd.ms-powerpoint">
<div id="ppt-viewer"></div>
import { createPptViewer } from '@file-viewer/ppt';
const viewer = await createPptViewer();
const input = document.querySelector('#ppt-file');
input.addEventListener('change', async () => {
const file = input.files?.[0];
if (!file) return;
await viewer.mount('#ppt-viewer', await file.arrayBuffer(), {
scale: 1,
pixelRatio: window.devicePixelRatio
});
});
mount() 会为每一页创建 Canvas 并渐进渲染。公网水印版不需要 license 文件,
也不限制正常 HTTP/HTTPS origin。
const response = await fetch('/documents/presentation.ppt');
const pptDocument = viewer.open(await response.arrayBuffer());
const canvas = document.querySelector('canvas');
pptDocument.renderSlide(0, canvas, { scale: 1.25 });
console.log(pptDocument.slideCount, pptDocument.width, pptDocument.height);
pptDocument.close();
文档不再使用时请调用 close(),以便立即释放原生内存。
| API | 用途 |
|---|---|
createPptViewer() / loadPptViewer() | 加载并校验原生预览引擎 |
viewer.mount(target, input, options) | 将完整演示文稿渲染为 Canvas 列表 |
viewer.open(input) | 打开 .ppt 并返回不透明文档句柄 |
document.renderSlide(index, canvas, options) | 将单页最终 RGBA 画面渲染到 Canvas |
document.close() | 释放原生文档内存 |
getPptPackageManifest() | 返回包与版本信息 |
所有公开 API 均提供 TypeScript 类型。解析后的文档模型、记录、HTML、SVG、 绘图指令流和无水印画面均不属于公开 API。
fetch 和 Canvas 2D 的现代浏览器ppt-native.wasm 与 index.mjs 一同发布的静态服务器或打包工具.wasm 配置 application/wasm MIME 类型'wasm-unsafe-eval'传统 PPT 可能包含宏、ActiveX、OLE、链接媒体或依赖桌面宿主的行为,浏览器无法 执行这些能力;预览器会把它们作为不可执行内容安全处理。原始字体不在内置回退 字体集时,会使用确定性的字体替代。
| 版本 | 允许用途 | 水印 | Origin |
|---|---|---|---|
| 公网 npm 版 | 自然人个人、非商业、非组织用途 | 每页强制显示 Flyfish Viewer | 任意正常 HTTP/HTTPS origin |
| 商业版 | 已授权的公司、组织、客户项目、内网、SaaS、OEM 或生产用途 | 按商业协议提供无公网水印构建 | 按商业协议执行 |
任何商业用途均需购买授权。 公司、组织、政府、学校、非营利机构、团队、 雇主、客户或委托项目的使用,包括内部评估,均属于商业用途。
公网 npm 版是专有软件,不适用 Apache-2.0。禁止删除、隐藏、遮挡、替换或 绕过强制水印。具有法律约束力的完整条款见 LICENSE。
商业授权请前往 Flyfish 商店购买。
FAQs
Professional native WebAssembly canvas viewer for PowerPoint 97-2003 (.ppt) files.
The npm package @file-viewer/ppt receives a total of 2,006 weekly downloads. As such, @file-viewer/ppt popularity was classified as popular.
We found that @file-viewer/ppt demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.

Research
/Security News
The campaign amassed more than 75,000 installs by targeting Russian-speaking users seeking access to blocked services.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.