@getv.design/export

中文文档
0.6.1发布于 2026/11/16SEE LICENSE IN LICENSETypeScriptES Module零依赖近 30 天下载 2158

Export vDesign (.vd) designs as PNG, JPEG, WebP, SVG, PDF, Illustrator, HTML, PowerPoint and GIF, in Node. No browser.

原始使用文档
文档目录6 节
  1. From the command line
  2. From code
  3. Fonts
  4. PowerPoint
  5. MP4
  6. Licence

@getv.design/export

Export vDesign designs (.vd files) as PNG, JPEG, WebP, SVG, PDF, Adobe Illustrator, HTML, PowerPoint and GIF, in Node, with no browser. The export is exactly what the vDesign canvas draws: the same layout, the same fonts, the same line breaks.

npm install @getv.design/export

Node 22 or later. Everything it needs is inside the package: the renderers are WebAssembly, and the Inter faces the designs default to are included. Other fonts come from the machine, from the design itself, or from a folder you name: see Fonts.

From the command line

npx vdesign-export deck.vd --format pptx                 # deck.pptx beside it
npx vdesign-export deck.vd -f png --scale 2 -o shots     # a PNG per frame
npx vdesign-export deck.vd -f pdf --frames cover,pricing # two pages
npx vdesign-export deck.vd -f svg --text outline --json  # the files and a report, as JSON

The design is a .vd, or a .vd.svg that carries one. Pictures come from the file itself, and a font the design names by path is read from beside it. The files made are printed to stdout and anything not drawn as the design asked (a missing font, a missing picture) to stderr. Exit code 0 means done, 1 that the export cannot be made, 2 a bad request. vdesign-export --help lists every option.

From code

import { exportFile, exportDesign } from '@getv.design/export';

const { files, notes } = await exportFile('deck.vd', { format: 'pdf' });
for (const file of files) await writeFile(file.name, file.bytes);

// A design you hold as text; font paths are read relative to `fontsFrom`.
const result = await exportDesign(source, { format: 'png', scale: 2, frames: ['cover'] });

A request that cannot be met at all (a frame that does not exist, a size no encoder can hold) throws ExportError. A design with problems never does: it is drawn as well as it can be, and notes says what was not drawn as asked.

Fonts

A design is drawn with, in order: the fonts it carries or names by path, the folders you hand over, the fonts installed on the machine, and Inter, which is in the package.

npx vdesign-export deck.vd -f pdf --fonts ./brand-fonts            # a folder of .ttf, .otf or .ttc
npx vdesign-export deck.vd -f pdf --fonts ./brand-fonts --no-system-fonts
await exportFile('deck.vd', { format: 'pdf', fonts: ['./brand-fonts'], systemFonts: false });

--no-system-fonts (systemFonts: false) leaves the machine's fonts out, so the export is the same wherever it runs. A font nobody has is drawn in Inter and reported in notes.

A deck that came from PowerPoint often names Calibri, Cambria, Arial or Times New Roman. Where those are not installed, put their open stand-ins in a folder you pass as fonts: Carlito, Caladea, Liberation Sans and Liberation Serif have the same widths, so lines break where they did. The design keeps saying Calibri, and notes says what drew it.

PowerPoint

A slide per frame, with shapes and text that stay editable, and the fonts embedded in the deck where their licence allows. text: 'outline' (or --text outline) draws text as shapes instead, exact on any machine.

MP4

Not here: Node has no H.264 encoder, so video is made by the vDesign app. GIF works.

Licence

Free to use, including commercially, under the vDesign Export Licence in LICENSE. The .vd format itself is open (CC BY 4.0). Third-party components, including the WebAssembly renderers and the Inter fonts, are listed with their licences in THIRD_PARTY_NOTICES.txt.

Version 0.6.1.

版本与发布记录

@getv.design/export 共发布 12 个版本,首次发布于 2026/10/27;过去 12 个月发布了 12 个版本。

版本发布日期距今
0.6.1latest2026/11/16今天
0.6.02026/11/132 天前
0.4.42026/11/096 天前
0.4.32026/11/096 天前
0.4.22026/11/0610 天前
0.4.12026/11/0313 天前

关于 @getv.design/export 的常见问题

@getv.design/export 是什么?

Export vDesign (.vd) designs as PNG, JPEG, WebP, SVG, PDF, Illustrator, HTML, PowerPoint and GIF, in Node. No browser.

如何安装 @getv.design/export?

在项目目录运行 npm install @getv.design/export,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 vdesign-export,可以用 npx vdesign-export 直接运行。

@getv.design/export 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@getv.design/export 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@getv.design/export 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@getv.design/export 可以商用吗?

@getv.design/export 使用 SEE LICENSE IN LICENSE 许可。许可条款写在包内的独立文件中,请阅读该文件确认可否商用。以上为概括,不构成法律意见,请以许可原文为准。

@getv.design/export 的下载量有多少?

根据 npm 官方下载统计,@getv.design/export 在 2026/10/17 – 2026/11/15 这 30 天内被下载 2,158 次,日均约 72 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@getv.design/export 还在维护吗?

最新版本 0.6.1 发布于 2026/11/16(今天);至今共发布 12 个版本,其中过去 12 个月发布了 12 个;首次发布于 2026/10/27。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。