显示HN:我制作了一个工具,让PDF看起来像扫描件,因为官僚主义。
Show HN: I made a tool to make PDFs look scanned because bureaucracy

原始链接: https://github.com/Francium-Tech/scanify

## Scanify:将PDF转换为逼真的扫描件 Scanify是一个命令行工具,可以将数字PDF文档转换为看起来像逼真的纸质扫描件。它通过应用一系列逼真的效果来实现这一点,包括纸张变暗、边缘阴影、噪点和轻微旋转——这些都是典型扫描件中常见的。 用户可以使用诸如`--aggressive`(更具戏剧性的外观)、`--bent`(模拟弯曲的纸张)和`--dusty`(添加斑点和颗粒,模拟脏扫描仪)等选项来控制这些效果的强度。 安装涉及使用Homebrew (`brew tap Francium-Tech/tap; brew install scanify`) 或从GitHub ([https://github.com/Francium-Tech/scanify](https://github.com/Francium-Tech/scanify)) 编译源代码。基本用法很简单:`scanify document.pdf` 会创建一个“扫描”版本。Scanify 采用MIT许可证发布。

Hacker News 新闻 | 过去 | 评论 | 提问 | 展示 | 工作 | 提交 登录 展示 HN:我制作了一个工具,让 PDF 看上去像扫描件,因为官僚主义。(github.com/francium-tech) 22 分,bragboy 48 分钟前 | 隐藏 | 过去 | 收藏 | 2 评论 bfffbgfdcb 11 分钟前 | 下一个 [–] 你应该告诉我们导致这个库出现的官僚主义废话;或者你已经说了,但我错过了。回复 mvkel 7 分钟前 | 上一个 [–] 最常见的展示 HN 之一: https://news.ycombinator.com/item?id=45700884 https://news.ycombinator.com/item?id=31083432 https://news.ycombinator.com/item?id=22811653 https://news.ycombinator.com/item?id=30027344 https://news.ycombinator.com/item?id=23157408 回复 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

Transform PDF documents to look like scanned documents.

scanify --aggressive --bent --dusty input.pdf

brew tap Francium-Tech/tap
brew install scanify
git clone https://github.com/Francium-Tech/scanify.git
cd scanify
swift build -c release
cp .build/release/scanify /usr/local/bin/
# Basic usage - creates input_scanned.pdf
scanify document.pdf

# Specify output path
scanify document.pdf scanned_output.pdf

# Aggressive mode - more noise, rotation, artifacts
scanify --aggressive document.pdf

# Bent paper effect - shadow band like curved paper
scanify --bent document.pdf

# Dusty scanner - random dust specks and particles
scanify --dusty document.pdf

# Combine options
scanify --aggressive --bent --dusty document.pdf
Option Description
--aggressive Apply stronger scan effects (more noise, rotation, artifacts)
--bent Add paper bend shadow effect (like curved paper under a scanner)
--dusty Add random dust specks and hair particles (like a dirty scanner glass)
--version Show version
--help Show help

Base Effects (always applied)

Effect Description
Paper darkening Whites become slightly gray (scanned paper is never pure white)
Edge shadows Vignette effect from scanner lid
Top shadow Gradient shadow at top edge
Uneven lighting Slightly off-center lighting variation
Noise/grain Paper texture simulation
Slight blur Optical imperfection
Random rotation Paper feed misalignment
Saturation reduction Scanner color limitations

Amplifies all base effects for a more dramatic scan appearance:

  • Stronger rotation (up to 1.5°)
  • More noise and grain
  • Heavier paper darkening
  • More pronounced edge shadows

Adds a horizontal shadow band across the page to simulate paper that isn't perfectly flat on the scanner glass.

Adds random artifacts to simulate a dirty scanner:

  • 15-40 dust specks of varying sizes
  • 0-3 thin hair/fiber lines
  • Randomly scattered (not uniform)

MIT License - see LICENSE

联系我们 contact @ memedata.com