/modify_pdf_python_notebook

Primary LanguageJupyter NotebookMIT LicenseMIT

modify_pdf_python_notebook

Modify PDF

Solution for cloud (such as google-colab) or a local (python notebook in a python environment).

Three Part Process:

  1. Turn pdf into multiple image pages
  • upload pdf
  • run pymupdf
  • (alternately, use screenshots or other method)
  1. modify images in photo-editor (google drawings)
  • use google drawings
  1. recombine images into one pdf
  • upload images
  • run img2pdf

Details:

  • works for all PDF's in a directory in one run
  • works for multi-page PDF docs
  • creates a directory for each PDF
  • puts all pictures (one per page) in that PDF's directory
  • changes can be done in Google Drawings or any photo editor
  • note: resolution is not great, using high rez screenshots may be better in some cases.