问题标签 [jsignature]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
373 浏览

php - jSignature 将数据加载为图片

好吧,所以我有一个小问题,我基本上是在尝试将这些数据输出为图像,但它似乎根本不起作用。

这是我保存代码的部分

现在我将数据保存为字符串(我将其从数组转换为字符串)

现在当我加载图像时

现在这里有一些关于这个的问题

  1. 我知道我提供图片代码而不是图片 URL 的问题,我该如何解决?好吧,当我加载图片时,它只是显示像图像这样的图标不存在
  2. 有什么办法可以将数据导出为图片而不是将其保存在数据库中?如果没有,我可以以某种方式从数据库加载数据然后导出吗?如果有怎么办?
  3. 由于我将图片保存为数据库中的 varchar,它应该有多大?目前我已将其设置为 1024,但我应该增加大小吗?因为这东西可能很重。
0 投票
2 回答
9485 浏览

php - jSignature jQuery 插件 - 从存储在 DB (base30) 中的签名制作图像

使用此命令保存图像后

我们可以将该数据存储到数据库中,它是一个简单的字符串:

现在如何从“base30”签名制作图像?我们可以把它转换成任何东西,以便它可以显示在网站上吗?

或者也许有一种方法可以禁用编辑画布。为了防止更改签名?

更新

我做了一些解决方法,它可以工作。

我创建了一个不可见的 div,我从数据库加载 jSignature 并使其不可见,然后我从中获取 svg 并在页面中显示该 svg

0 投票
1 回答
947 浏览

jsignature - Django 1.10.5 Python 3.5.2 Jsignature

应用程序 Jsignature 正是我所需要的。看起来不错。对我来说不幸的是,我无法让它工作。这个应用程序适合 Django 1.10.5 和 Python 3.5.2 吗?

我使用了示例代码,没有进行任何更改,但我仍然只得到按钮而不是签名字段。

我想做的是:使用来自网站的数据(由用户填写)我创建一个 pdf。为此,我使用 Wea​​syprint 和模板。这一切都很好。现在我也想将来自同一模板的签名添加到 de pdf 中。我怎么做?有人可以帮助我吗?

0 投票
2 回答
1162 浏览

javascript - 在 vuejs 组件中实现 Jsignature

我是 Vue 的新手,并试图在“自定义”Vuejs 组件中实现 Jsignature。

我的解决方案基于:https ://vuejs.org/v2/examples/select2.html

它应该是直截了当的,但是我没有让它工作,到目前为止我得到的解决方案导致以下错误:

'Jsignature' 已定义但从未使用
import Jsignature from '../../lib/jsignature

包含签名的组件。

签名组件。

0 投票
1 回答
227 浏览

jsignature - 如何将事件绑定到 JSignature 焦点

我正在使用 JSignature 并试图弄清楚如何在签名获得焦点和失去焦点时触发事件。

绑定到更改事件有效,但焦点、鼠标按下等不会触发。

如果有人知道如何执行此操作,将不胜感激

0 投票
1 回答
3700 浏览

javascript - Save Signature when Form is Submitted

I'm using the jSignature plugin to add signature capture to a simple Bootstrap modal window - the signature capture displays correctly and I can draw and save the signature without any issues. Here's a screenshot showing the signature modal window in action:

enter image description here

At present the user must enter their signature then click the Save button below the signature for it to be saved. They then have to click the Submit button to submit the form which updates a database etc.

Here's the html code for the modal window:

We have found them many users are forgetting to click the Save button to first save the signature and simply clicking the Submit button which submits the form but doesn't include the signature, and by the time we notice it's too late to get the signature again.

Here's the Javascript that runs when the signature Save button is clicked:

We're looking for a way, when the Submit button is pressed, to automatically save the signature first and then submit the form. Not sure if this is possible or how to achieve this?

0 投票
0 回答
101 浏览

python - 通过 manage.py 在本地运行 django 站点时是否可以显示 PIL 图像?

我正在尝试将jSignature图像保存到 django FileField。我的表单保存代码如下:

目前,当签名保存到文件字段时,它会创建一个具有正确分辨率的图像,但那是完全黑色的,这显然是不正确的。因为我们使用谷歌存储桶作为网站媒体的实时版本,所以涉及创建实际本地文件的解决方案将不起作用。最后,我有两个问题:

  1. 什么可能导致图像保存不正确? 2. 是否可以在 django 中使用诸如 signature_image.show() 之类的东西(目前没有显示任何错误但也没有显示任何内容)来查看以 PIL.Image.Image 形式存在的图像,这样我就可以找出在哪里在这个过程中图像被破坏了? 我能够通过按照Image.show()中的建议安装 imagemagick 来显示图像任何已发布代码的问题。
0 投票
1 回答
1593 浏览

jquery - 使用 Google 脚本将图像保存到电子表格

我正在尝试使用 jSignature 将签名板添加到 Google 表格。我添加了一个对话框,记录这样的签名:

唯一的问题是我无法弄清楚如何将图像放入单元格中。复制/粘贴不起作用,据我所知,它需要插入。我在想也许我编写了一个函数将其保存到 Google Drive,然后使用 URL 将其插入,但我仍然不知道如何获取实际图像以便对其进行任何操作。任何见解表示赞赏,我是 GS 的新手。

0 投票
1 回答
1138 浏览

javascript - 我怎样才能删除签名板上的中间线

如何从 jSignature 插件中的 CANVAS(签名面板)中删除中间线?

*我正在使用 libs/jSignature.min.noconflict.js *

http://willowsystems.github.io/jSignature/#/demo/

0 投票
0 回答
574 浏览

javascript - 移动设备上的 jSignature - 隐藏画布,然后显示空白 sig

使用 jSignature,我将图像字符串从数据库(base30)中提取出来。我检查数据库中的内容,并执行以下操作: 1. 隐藏我的清除按钮 2. 显示我的编辑按钮 3. 将我的 base 30 数据导入 jsignature div 4. 从 jsignature 创建一个图像,并在图像 div 5. 隐藏我的 jsignature div

我对此进行了编辑:

在桌面上,这非常有效(FF/Chrome)。显示正确的按钮,隐藏图像 div,并显示签名 div,看起来像这样:

但是:在移动设备上,当我单击编辑时,图像 div 隐藏,并且 jsignature div 显示为空白。我知道它已被填充,因为如果我跳过上面描述的初始隐藏,两个 div 都会出现。

这真的很奇怪:如果我点击取消,然后再次编辑,它显示得很好!!

这是我的取消功能:

所以问题是:为什么隐藏一个包含 jsignature 画布的 div,然后重新显示它会导致它空白?这发生在移动 Safari 和 iOS 版 chrome 中。