Skip to content

Instantly share code, notes, and snippets.

View wenmin92's full-sized avatar
😟
Learning ~~~

柱子 wenmin92

😟
Learning ~~~
  • han-networks
  • Beijing, China
View GitHub Profile
@wenmin92
wenmin92 / remove_pdf_watermark.py
Created September 7, 2022 10:34
Using the python library PyMuPDF(https://pymupdf.readthedocs.io/en/latest/index.html) to remove the text watermark in pdf
import fitz
import re
pattern = b'q\\n/\\w+ gs\\n1 0 0 1 210 \\d\\.\\d{,2} cm\\n0 0 1 rg\\nBT\\n/QQAPF5cabeeee 10 Tf\\n1 0 0 1 0 0 Tm\\n\\(www\\.it-ebooks\\.info\\) Tj\\nET\\nQ\\n'
doc = fitz.open('D:\\Downloads\\test-mu.pdf')
for page in doc:
# remove watermarks
page.clean_contents()
xref = page.get_contents()[0]
@wenmin92
wenmin92 / LaunchyQt.json
Created August 5, 2019 09:57
LaunchyQt manifest for scoop
{
"homepage": "https://github.com/samsonwang/LaunchyQt",
"description": "Launchy project reactivated. Get the familiar feeling now!",
"license": "GPL-3.0-only",
"version": "3.0.8",
"url": "https://github.com/samsonwang/LaunchyQt",
"architecture": {
"64bit": {
"url": "https://github.com/samsonwang/LaunchyQt/releases/download/v3.0.8/Launchy-3.0.8-win-amd64.7z",
"hash": "cb3183105af62eed2ce50d52dcc1e540e4c54d4d86768547ca72a21013084a92",