Skip to content

Instantly share code, notes, and snippets.

View meowmeowxw's full-sized avatar
🤔
Always thinking

Giovanni Di Santi meowmeowxw

🤔
Always thinking
View GitHub Profile
@notdodo
notdodo / addjstopdf.py
Last active March 27, 2020 21:55
Add embedded JavaScript script to a PDF document (python3)
#!/usr/bin/env python3
# https://gist.github.com/edoz90/a441f2bdfc8c99c1999db0a3e8495fb6
# Author: notdodo
try:
from PyPDF2 import PdfFileWriter, PdfFileReader
import click
except ModuleNotFoundError:
print("pip install pypdf2 click")
import sys