PSPDFKIT 为每个页面添加图章

发布于 2025-01-15 22:17:41 字数 97 浏览 3 评论 0原文

检查为我的客户使用此框架的试用,虽然我可以在单个页面上添加“已收到”邮票,但似乎没有办法自动向每个页面添加邮票。框架是否支持无需为每个页面调用API?这在前端 UI 中做得更好吗?

Checking through the trial for using this framework for my client and while I can add a "received" stamp on a single page there doesn't seem to be a way to add a stamp to each page automatically. Does the framework support that without calling the API for each page? Is this better done in the front-end UI?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

枯叶蝶 2025-01-22 22:17:41

是的,您需要将图章添加到每个页面,但可以通过传递图章注释数组来一次调用instance.create()来完成:

instance.create(
    Array.from({
        length: instance.totalPageCount
    }).map((_, pageIndex) =>
        new PSPDFKit.Annotations.StampAnnotation({
            pageIndex,
            // other annotation properties
        })
    )
)

但是,“已收到”不是内置图章注释类型,所以你可能不得不使用图像注释。

Yes, you need to add the stamp to each page, but it can be done in a single call to instance.create() by passing an array of stamp annotations:

instance.create(
    Array.from({
        length: instance.totalPageCount
    }).map((_, pageIndex) =>
        new PSPDFKit.Annotations.StampAnnotation({
            pageIndex,
            // other annotation properties
        })
    )
)

However, "received" is not a built-in stamp annotation type, so you'll probably have to use image annotations instead.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文