@embedpdf/default-stamps

中文文档
1.0.0发布于 2026/11/07TypeScriptES Module零依赖近 30 天下载 6682

The standard rubber-stamp library as Acrobat-compatible PDFs, one per locale: title, /Names /Pages registry (identifier=label), vector artwork. Import with @embedpdf/plugin-stamp or drop into Acrobat's Stamps folder.

原始使用文档
文档目录4 节
  1. Use
  2. As part of your build
  3. V2 compatibility
  4. Provenance

@embedpdf/default-stamps

The standard rubber-stamp library — Approved, Draft, Confidential, Sign Here, … — as one PDF per locale, in Acrobat's own stamp-library dialect:

  • /Title is the library name (Standaard stempels).
  • /Names /Pages registers every page as identifier=label (Approved=Goedgekeurd): the identifier becomes a placed stamp's /Name, the label its /Subj and the picker text.
  • Every page is one vector stamp; /PieceInfo carries the library id (embedpdf-standard), the locale, and each stamp's kind.

The v3 importer reads everything from the PDF. The same file drops into Acrobat's Stamps folder and shows up as a library there.

LocaleFileName
enen/stamps.pdfStandard Stamps
dede/stamps.pdfStandardstempel
nlnl/stamps.pdfStandaard stempels
frfr/stamps.pdfTampons standards
eses/stamps.pdfSellos estándar
zh-CNzh-CN/stamps.pdf标准印章
svsv/stamps.pdfStandardstämplar
jaja/stamps.pdf標準スタンプ

Every locale registers the same 17 identifiers in the same page order; only the labels differ. Import two locales side by side and the plugin keeps them as two libraries with one identity.

Use

import { StampToken } from '@embedpdf/plugin-stamp';
import { loadDefaultLibrary } from '@embedpdf/default-stamps/library';

const stamp = registry.capability(StampToken);
await stamp.importLibrary(await loadDefaultLibrary('nl')); // title, identifiers, labels come from the file

As part of your build

@embedpdf/default-stamps/library delivers each locale through the module graph — a generated ES module per locale, loaded with a literal dynamic import — so the library ships as a lazy chunk of your own build. Nothing to copy, no asset pipeline to configure, no CDN:

import { LOCALES, loadDefaultLibrary } from '@embedpdf/default-stamps/library';

const bytes = await loadDefaultLibrary('nl'); // the PDF; unknown codes fall back to `en`
await stamp.importLibrary(bytes);

The PDFs themselves stay in the package (<locale>/stamps.pdf) for self-hosting and for Acrobat.

V2 compatibility

Keep each <locale>/manifest.json in every release, including the stable release. Already deployed v2 viewers request these files from the unversioned jsDelivr URL for this package, so a major version bump does not isolate them. The manifests retain v2's library id, categories, stamp ids, localized labels, and page indexes. Their relative pdf: "stamps.pdf" points to the same PDF that v3 uses; the new catalog metadata does not change the artwork or page order that v2 reads.

These manifests are compatibility files for v2, not an input to the v3 loader. Do not remove or rename them, or reorder PDF pages without preserving the legacy page-index mapping. The release consume gate runs the stamp-library tests against the packed npm artifact to verify all eight manifests and their PDF page mappings before publishing to either next or latest.

Provenance

The artwork is Acrobat's standard stamp set, carried over unchanged from the previous major of this package; only the catalog was added (title, registry, PieceInfo). The stamp plugin's test suite re-imports every shipped file and checks its title, identifiers, and labels.

版本与发布记录

@embedpdf/default-stamps 共发布 4 个版本,首次发布于 2026/03/30;过去 12 个月发布了 4 个版本。

版本发布日期距今
1.0.0latest2026/11/076 天前
1.0.0-next.1next2026/10/1430 天前
1.0.0-next.02026/09/102 个月前
0.0.12026/03/307 个月前

关于 @embedpdf/default-stamps 的常见问题

@embedpdf/default-stamps 是什么?

The standard rubber-stamp library as Acrobat-compatible PDFs, one per locale: title, /Names /Pages registry (identifier=label), vector artwork. Import with @embedpdf/plugin-stamp or drop into Acrobat's Stamps folder.

如何安装 @embedpdf/default-stamps?

在项目目录运行 npm install @embedpdf/default-stamps,或使用 pnpm add / yarn add / bun add。

@embedpdf/default-stamps 支持 TypeScript 吗?

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

@embedpdf/default-stamps 支持 ESM 还是 CommonJS?

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

@embedpdf/default-stamps 可以商用吗?

@embedpdf/default-stamps 使用 未声明 许可。package.json 没有声明许可证。没有许可证的代码默认保留全部权利,商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括,不构成法律意见,请以许可原文为准。

@embedpdf/default-stamps 的下载量有多少?

根据 npm 官方下载统计,@embedpdf/default-stamps 在 2026/10/14 – 2026/11/12 这 30 天内被下载 6,682 次,日均约 223 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@embedpdf/default-stamps 还在维护吗?

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