/JSembed

Simple Python tool to embed JavaScript code in different types of files (pdf and svg for now)

Primary LanguagePython

JSembed

Simple Python tool to embed JavaScript code in different types of files (pdf and svg for now)

Rerequisites

  • PyPDF2
  • re
  • argparse

Install

$ git clone https://github.com/mathis2001/JSembed

$ cd JSembed

$ python3 jsembed.py

Usage

$ python3 jsembed.py [--pdf path/to/input.pdf] [--svg path/to/input.svg] [--js path/to/input.js] [--output output.pdf or output.svg]

Options

options:
  -h, --help                     show this help message and exit
  -p PDF, --pdf PDF              Path to the original PDF file
  -s SVG, --svg SVG              Path to the original SVG file
  -j JS, --js JS                 Path to the JavaScript file to embed
  -o OUTPUT, --output OUTPUT     Output file name (.pdf or .svg)

Screenshots

Usage PDF SVG