Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cnhis-frontend/signature

Package Overview
Dependencies
Maintainers
5
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cnhis-frontend/signature

手写板签名对接 sdk

  • 1.0.2-beta.0
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
5
Weekly downloads
 
Created
Source

signature-sdk

手写板签名对接 sdk

厂商列表

  • 捷宇技术(默认)
  • 天谷信息
  • 河北腾翔

如何使用

import SignatureSDK from '@cnhis-frontend/signature'

// 创建签名实例,注意,重复创建也只会返回上一个实例对象

// 捷宇
const signatureSdk = SignatureSDK.create()
const { signImage, fingerImage, signXml, mixImage, signFileStr } =
	await signatureSdk.start(option)
/* option类型为undefined | {
	strokeWidth?: number; 签名线条粗细值,默认值 3
	padPath?: string; 预览目标pdf文件路径
	xmlPath?: string; xml文件生成路径,
	location?: string; 签名或者指纹的位置,一个签名或指纹标准格式为Type.Page.X.Y,默认值 '2.1.100.100'
						Type---------0为签名,1为指纹,2为指纹加签名
						Page---------表示页码
						X-------------坐标位置
						Y-------------坐标位置
						(比如只有一个签名时表示“0.1.100.100”)多个位置时用 “|”分隔符
	voiceStr?: string; 播放的提示语,默认值 '请签名'
	ifPreview?: number; 只签名或者签名 pdf 文件,2 为签名 pdf 文件, 1 为预览 pdf文件,0 为只签名或者只按指纹,此时 PDFPath 可以为空,默认值 0
} */

// 天谷
const signatureSdk = SignatureSDK.create({ name: 'tiangu' })
const { signImage } = await signatureSdk.start('sign')
const { fingerImage } = await signatureSdk.start('finger')

// 河北腾翔(signImage包含了手写签名和指纹)
const signatureSdk = SignatureSDK.create({ name: 'tengxiang' })
const { signImage } = await signatureSdk.start(option)
/* option类型为undefined | {
	content?: string; 签名原文,默认为空
	zoomSize?: number; (0 – 100)表示输入图案为原图的百分比,0表示不缩放,默认25
} */

// 销毁实例,执行后可使用SignatureSDK.create()创建一个新实例
SignatureSDK.destroy()

FAQs

Package last updated on 12 Jun 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc