工具与资源gitlab.com
FalsiScan:让 PDF 看起来像手签并扫描过
FalsiScan: Make it look like a PDF has been hand signed and scanned
2020 — 2022,它一次次回到首页
黑点是上首页(≥ 50 分)的那次投稿,空心点是没冲上去的投稿,点越大分数越高。
导读
FalsiSign(页面标题也写作 FalsiScan)是一个小工具,用来让 PDF 看起来像是手写签名后再扫描出来的文件,常见做法包括贴入签名图片、加噪点、轻微旋转/位移、转灰度等。它主要面向仍要求“湿签名”或纸质扫描件的办事流程,帮人免去打印、签名、再扫描的麻烦。
为什么经久不衰:它用一点图像处理戳破了“必须打印签名再扫描”的形式主义,既实用又让人反思签名和纸质流程到底在验证什么,所以多年后仍会被翻出来。
HN 评论精选
用 ImageMagick 脚本模拟扫描件,能省掉上百页的打印扫描。
我用 ImageMagick 写了一个 shell 脚本,给 PDF 加上“扫描仪”效果。通常先用 Master PDF Editor 打开 PDF 插入签名图片,再跑脚本。需要用到的时候很少,但真是救星;它让我免于为抵押贷款公司、一些股票经纪和银行打印并扫描 100 多页文件。脚本关键点:用 '+noise Random -fill white -colorize 95%' 加噪点;用 '-distort ScaleRotateTranslate' 随机水平和垂直平移并轻微旋转;'-density 150' 用较低分辨率掩盖不是真扫描;'-colorspace Gray' 转黑白;'-quality 60' 提高 JPG 压缩、降低画质。
mrb查看英文原文
I have a shell script based on ImageMagick that gives a PDF a "scanner" look. I typically open the PDF in Master PDF Editor to insert an image of my signature, then pass it through my script. When I do need it, it's rare, but it becomes a real life saver. It has avoided me the need to print and scan 100+ pages for a mortgage company, some stock brokers and banks. Key points of the script: "+noise Random -fill white -colorize 95%" to add some noise to the image "-distort ScaleRotateTranslate '$x,$y $angle'" to randomly shift horizontally and vertically the document, and randomly rotate it slightly "-density 150" for a low-ish resolution so it better hides the fact the PDF wasn't really scanned "-colorspace Gray" to make it black & white "-quality 60" to increase JPG compression and somewhat reduce picture quality #!/bin/bash # Make a pdf look like it was scanned. if [ $# -ne 2 ]; then echo "Usage: $0 input output" >&2 exit 1 fi tmp="$1".scanner-look.tmp mkdir "$tmp" && # without -flatten some PDF convert to a JPG with a black background convert -density 150 "$1" -colorspace Gray -quality 60 -flatten "$tmp"/p_in.jpg && : || exit 1 # each page is randomly shifted in the X and Y plane. # units seem to depend on angle of rotation in ScaleRotateTranslate? offset() { echo $(($RANDOM % 1000)); } for f in "$tmp"/p_in*jpg; do # each page is randomly rotated by [-0.5 .. 0.5[ degrees angle=$(python -c 'import random; print(random.random()-0.5)') x=$(offset) y=$(offset) convert "$f" \ -blur 0x0.5 \ -distort ScaleRotateTranslate "$x,$y $angle" +repage \ \( +clone +noise Random -fill white -colorize 95% \) \ -compose darken \ -composite \ $ {f/p_in/p_out}.pdf || exit 1 done # concatenate all the pages to one PDF # use "ls -v" to order files correctly (p_out-X.jpg where X is 0 1 2 ... 9 10 11 ...) pdftk $(ls -v "$tmp"/p_out*.pdf) cat output "$2" && rm -rf "$tmp"
用 Xournal++ 加签名,再用一条 ImageMagick 命令做出扫描效果。
好工具!不过我個人只是用 Xournal++ 编辑 PDF(加文字、加签名图片等),然后用下面命令“伪造扫描”:convert -density 150 input.pdf -colorspace gray -blur 0x0.1 -sharpen 0x5.0 -level 10%,90% -rotate -0.5 -sharpen 0x1.2 output-scanned.pdf
jsiepkes查看英文原文
Nice tool! Though personally I just use something like Xournal++ to edit the PDF (add text, add a signature image, etc.) and then use the following command to "fake scan it": convert -density 150 input.pdf -colorspace gray -blur 0x0.1 -sharpen 0x5.0 -level 10%,90% -rotate -0.5 -sharpen 0x1.2 output-scanned.pdf
机构要的是“像邮寄原件”的外观,打印后折三折就能过关。
我在 DMV 遇到过另一个版本:他们要看证明我居住地址的账单(电费/水费等)。结果他们要求账单必须是邮寄到你的,但我所有账单都是无纸化,行不通。于是我把账单打印出来,还折成三折,像在信封里装过。排我前面的人因为用打印账单被拒,我的却顺利通过。
cpitman查看英文原文
I had another version of this at the DMV. They needed to see bills that offered proof of my residence (ie power/water/etc). Turns out they wanted them to be mailed to you, which wasn't going to work because I do paperless billing for everything. So I printed them out and tri-folded them as if it had been in an envelope. People in front of me in line got turned away for using printed bills, but mine worked just fine.
数字签名的校验很麻烦,作者开源了一个 REST API 来检查 PDF 签名。
我们组织的问题不一样。我们内部文件大量使用数字签名的 PDF——文件没签名就无效(主要用 JSignPdf 签)。一些内部应用必须收到这种签名文件才能继续流程。检查 PDF 是否数字签名、有几个签名、是否都有效并不容易!我只知道用 Java 的 Bouncy Castle 来做。为了帮非 Java 应用,我写了个小型 Java 程序,提供 REST(和表单)API:上传签名 PDF,返回签名信息。它在我们组织运行了 3 年多,避免了数百份错误签名的 PDF!我把它开源了:https://github.com/spapas/pdf-sign-check。
spapas82查看英文原文
In my organization we have a different problem. We heavily use signed pdf files for all our internal documents - if a document is not signed it's not valid (they are mainly signed with JSignPdf). A number of internal applications need such signed files in order to proceed with a workflow. Checking if a PDF file has been digitally signed, how many signatures are there and if the signatures are all valid is not an easy task! Actually, I only know how to do it in java using bounty castle. To help non-java apps with this I've implemented a small java application that provides a REST (and form) api for uploading a signed PDF file and returning information about the signatures. It works in my organization for more than 3 years and it's has saved us from hundreds of erroneously signed PDF files! I've open sourced it for anybody having similar requirements: https://github.com/spapas/pdf-sign-check.
历次讨论
同类还值得读
直接在浏览器中启动 Linux 内核
Boot a linux kernel right inside your browser.
Fabrice Bellard 的 JSLinux 页面,用 JavaScript 在浏览器里启动一个 Linux 内核,并提供一个可交互的终端环境。
工具与资源上首页 5 次 · 2011–2025bellard.orgHacker News 未公开功能与行为清单(2018)
A List of Hacker News's Undocumented Features and Behaviors (2018)
数据科学家 Max Woolf 整理的 Hacker News 未公开功能与行为清单,涵盖投票机制、排名算法、账号惩罚等社区运作细节。
工具与资源上首页 5 次 · 2019–2025github.comMapSCII:在终端中用盲文和 ASCII 渲染地图
MapSCII – Braille and ASCII map renderer for the console
MapSCII 是一个在命令行终端里渲染地图的开源工具,用盲文字符和 ASCII 字符把地理数据画成可交互浏览的字符地图。
工具与资源上首页 5 次 · 2017–2025github.com顶尖大学的免费在线课程
Free Online Courses from Top Universities
Open Culture 整理的一份免费在线课程合集,汇集了全球顶尖大学(如 MIT、斯坦福、耶鲁等)向公众开放的网络课程资源,涵盖音频、视频等多种形式。
工具与资源上首页 5 次 · 2010–2022openculture.com淘气字符串:容易引发用户输入问题的字符串清单
Naughty Strings: A list of strings likely to cause issues as user-input data
一个 GitHub 仓库,收录了大量容易让程序出问题的用户输入字符串,如特殊字符、emoji、SQL 注入片段、系统命令等,供开发者用于测试输入处理逻辑。
工具与资源上首页 4 次 · 2015–2020github.com