Skip to content

Instantly share code, notes, and snippets.

@arttema
Created October 12, 2016 12:25
Show Gist options
  • Save arttema/99456859b0a58686f61420ae36cdae3f to your computer and use it in GitHub Desktop.
Save arttema/99456859b0a58686f61420ae36cdae3f to your computer and use it in GitHub Desktop.
Protect pdf from copy pasting or plagiarism checking
brew install ghostscript
brew install pswrite
#USE PSWRITE2 if needed
#!/bin/sh
GS=/usr/bin/gs
$GS -sDEVICE=pswrite -dNOCACHE -sOutputFile=- -q -dBATCH -dNOPAUSE "$1" -c quit | ps2pdf - > "${1%%.*}-rst.pdf"
if [ $? -eq 0 ]; then
echo "Output written to ${1%%.*}-rst.pdf"
else
echo "There were errors. See the output."
fi
@Bladebringer
Copy link

Bladebringer commented Jan 16, 2022

Great, thanks! Often I have to work with various documents, including the PDF format. I have to do this at the university while writing various studies. I always try to check my texts for plagiarism and use the plagiarism checker https://fixgerald.com/ for this. This allows me to write the highest quality original articles and research.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment