From b3f8dca249832c9b1050bd9cfacdbfbacae22d98 Mon Sep 17 00:00:00 2001 From: Dan Howe Date: Wed, 28 Mar 2018 09:10:27 +1100 Subject: [PATCH] Update README --- README.md | 28 +++++++++++++++++++++------- scripts/pdf_unlock.py | 1 - 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index b28d3e3..9891c4d 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,29 @@ -# photo-to-kml # +# pdf-unlock # -__photo-to-kml__ creates a kml file that shows geotagged images in Google Earth. - -![Images shwon in Google Earth](doc/google-earth.jpg) +__pdf_unlock__ removes security features from pdfs. ## Installation ## -`pip install simplekml` +[Ghostscript](https://ghostscript.com) is required. When installing Ghostscript, make sure there is an executable called `gs` in your path. This should happen automatically with Linux, but Windows users will have to add the path to Ghostscript to the `PATH` environment variable manually, eg: + +`C:\Program Files\gs\gs9.21\bin` + +Then the Ghostscript executable `gswin64.exe` should be copied to a new executable called `gs.exe`. ## Usage ## -Create a kml for a folder of photos, named 'image_folder': -`python photo_to_kml.py image_folder` +Search for pdfs inside 'pdf_folder', then create new unlocked versions +of the pdfs with the the suffix '-unlocked.pdf': + +`> python pdf_unlock.py pdf_folder` + +Search for pdfs inside 'pdf_folder', then unlock the pdfs and overwrite +the original versions. + +`> python pdf_unlock.py pdf_folder -o` + +Search recursively for pdfs inside 'pdf_folder' and all subfolders, +then unlock the pdfs and overwrite the original versions. + +`> python pdf_unlock.py pdf_folder -o -r` diff --git a/scripts/pdf_unlock.py b/scripts/pdf_unlock.py index ac514f4..4d9d9e7 100644 --- a/scripts/pdf_unlock.py +++ b/scripts/pdf_unlock.py @@ -38,7 +38,6 @@ __version__ = "0.1.0" __email__ = "d.howe@wrl.unsw.edu.au" import os -import sys import glob import argparse import subprocess