Hi all,
Is it possible to disable copy and paste from a PDF file to minimise casual/easy plagiarism?
I'd like to only allow users to view the PDF (and print a hard copy). Having to hand type the content of the orginal may deter some malicious users.
I am running ubuntu and typically create a pdf using the latex GUI called Texmaker.
I create my pdf images via pstricks, so my pdfs are created as follows:
dvi-to-ps and ps-to-pdf.
Perhaps there is a command-line argument to be passed to disable certain features such as copy and paste or to some extend print features.
regards,
Paddy.
General ⇒ Minimize plagiarism by disbale copy and paste, etc
-
- Posts: 1
- Joined: Wed Sep 01, 2010 7:14 pm
NEW: TikZ book now 40% off at Amazon.com for a short time.

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Minimize plagiarism by disbale copy and paste, etc
Not directly with LaTeX. It will require tools like pdfk. But you should be aware of the fact that it is very easy to evade those protecting mechanisms. So I'm afraid that your efforts might come to nothing.paddyjoesoap wrote:[…] Is it possible to disable copy and paste from a PDF file to minimise casual/easy plagiarism? […]
Best regards and welcome to the board
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Minimize plagiarism by disbale copy and paste, etc
One option would be to rasterize the PDF, i.e., convert each page to an image. This would result in a much larger document, with a *loss* in quality, and of course, those who know about OCR software could always just use it to get the text back.
Anyway, I'm sure there's a much shorter and simpler command to do this, but in Ubuntu, I think you could use the following (change inputpdf="..." and outputpdf="..." for your desired filenames, and make sure there are no files named page*.jpg in the directory, or they'll get deleted):
(That's all meant as one line, though you could break it up unto a bash script if you wanted. It requires ImageMagick and various poppler utilities, but there's a good chance you already have those installed.)
Anyway, I'm sure there's a much shorter and simpler command to do this, but in Ubuntu, I think you could use the following (change inputpdf="..." and outputpdf="..." for your desired filenames, and make sure there are no files named page*.jpg in the directory, or they'll get deleted):
Code: Select all
inputpdf="input.pdf" && outputpdf="output.pdf" && pages=$(pdfinfo $inputpdf | sed -n 's/Pages: *\([0-9]*\)/\1/p') && for page in $(seq -f %04.f $pages) ; do pdftoppm -jpeg -f $page -l $page "$inputpdf" > "page$page.jpg" ; done && convert page*.jpg -quality 65 $outputpdf && rm page*.jpg