Skip to content

Instantly share code, notes, and snippets.

View alem0lars's full-sized avatar
💭
corrupting memory

Alessandro Molari alem0lars

💭
corrupting memory
View GitHub Profile
@notdodo
notdodo / addjstopdf.py
Last active October 18, 2024 17:35
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