在Webviewer中自定义PDFTRON签名工具

问题描述 投票:0回答:1

我在试用版上一直在为我的网站探索pdftron,但我找不到任何自定义签名工具的具体示例,任何帮助表示赞赏。

signature pdftron
1个回答
0
投票

本指南提供了有关签名工具和一些可用的https://www.pdftron.com/documentation/web/guides/advanced/signature API的信息

例如,这里是指南中有关如何自定义sign here元素的代码片段。

var createSignHereElement = Annotations.SignatureWidgetAnnotation.prototype.createSignHereElement;

Annotations.SignatureWidgetAnnotation.prototype.createSignHereElement = function() {
  // signHereElement is the default one with dark blue background
  var signHereElement = createSignHereElement.apply(this, arguments);

  signHereElement.style.background = 'red';
  return signHereElement;
}

如果要对UI进行更复杂的自定义,WebViewer UI组件都是开源的,并且可以进行修改。这是SignatureModal组件的链接,可以帮助您入门https://github.com/PDFTron/webviewer-ui/tree/master/src/components/SignatureModal

本指南讨论如何编辑和运行UI https://www.pdftron.com/documentation/web/guides/ui/advanced-customization

© www.soinside.com 2019 - 2024. All rights reserved.