A usefull script for injecting js code into innocent pdf file, using pypdf library.
This script will open the input file and the payload, and creates a new combind fil.
pip install pypdf
'payload.js' is the payload file
'installation.pdf' is the PDF file you want to inject
python PDFScript.py -i installation.pdf -p payload.js