I would like to ask is there any way to covert some texts/listings to images so that they could not be copied?
I would appreciate any suggestions.
I would like to ask is there any way to covert some texts/listings to images so that they could not be copied?
I would appreciate any suggestions.
Matt G answered another question
You can use ImageMagick to convert the pdf to an image pdf. Running convert file1.pdf file2.pdf will create a pdf called file2.pdf which is about the same size as the input pdf but since its an image, the text cannot be selected. There is a notable decrease in quality though
To improve quality simply add a high density (eg 300):
convert -density 300 file1.pdf file2.pdf
an example:
\documentclass[htb]{memoir}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{duckuments}
\usepackage{lipsum}
\begin{document}
\blindduck
\lipsum[1-20]
\end{document}
and can be converted to high quality pictures:

You can increase the density to above 300, if it was not enough
If your goal is not merely to turn the text into a picture, but make it unobtainable, you can make it the same color as the background:
\documentclass[htb]{memoir}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{xcolor}
\usepackage{duckuments}
\usepackage{lipsum}
\begin{document}
\textcolor{white}{
\blindduck}
\lipsum[1-20]
\end{document}
Produces a pdf with markable text:
Converting it will make it both unmarkable and invisible, so you cannot obtain it from the pdf:
using the tool posted by @KJO on the above image I got the text:
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, fells. Curabitur dictum
Leaving the duck completely out.
merged into. I agree completly then ;-) – Thorbjørn E. K. Christensen Jun 13 '19 at 13:02