Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

So I have my CV publicly available on my website and it has both my email address on it, and the email addresses of my references. In the interest of protecting my self and them from spam, I was wondering if there was a good way of adding extra resistance to email addresses when in PDF form. Currently to display the email addresses I use:

\href{mailto:name@domain.tld}{\nolinkurl{name@domain.tld}}

Can I change this somehow to make things a little bit more secure?

share|improve this question
1  
I'd insert mail addresses as bitmap images. –  AlexG Dec 17 '13 at 14:00
    
I thought about that, but it doesn't deal with scaling. It's not a huge problem, but it would be nice to solve it. –  Velox Dec 17 '13 at 15:31
1  
@velox: You can scale the graphics to suit your needs. On a related note, you might be interested in What can cause generated PDF document whose text are not correctly copyable?, which deals with security in a PDF. –  Werner Dec 17 '13 at 16:58
    
Yes, you can scale and insert them, however if the user zooms in on the PDF then the bitmap will appear pixellated while the rest of the text remains clear. Also, just looked at the link and there is a good example there. Thanks. –  Velox Dec 17 '13 at 17:29
1  
Is there any evidence that protective measures actually decrease the amount of spam you receive? –  StrongBad Dec 21 '13 at 12:59

2 Answers 2

up vote 9 down vote accepted

If you want to include the email address as an image but don't want to loose quality, why not use a PostScript image? If Adobe Illustrator is available to you, it's easy to convert any font in a PDF to a vector path. I'm sure there are open source tools that can do the same.

  • Create a New Illustrator Document
  • File > Place... > Select the PDF with your CV
  • Object > Flatten Transparency... > check 'Convert All Text to Outlines' > OK
  • Delete everything except your email address
  • Adjust the Artboard and Export as PDF

enter image description here

This export can replace the email address in your CV. It can't be selected, and its quality is as a good as any text.

enter image description here enter image description here

\documentclass{article} 
\usepackage{graphicx}
\begin{document}
This is my CV. You can reach me at \smash{\raisebox{-2pt}{\includegraphics{email}}} if you like.
\end{document}

Update:

Several free tools can vectorize PDFs. Some tools automatically replace unknown embedded fonts with standard fonts. These shouldn't be used. Inkscape is still among them unfortunately (see this bug report from 2009).

The Wikipedia Graphics Lab pages mention a few other tools: PDF2SVG or online service misc2svg. I tried misc2svg, it worked fine. The SVG output can be cropped and converted to a PDF in Inkscape. You might even be able to convert the SVG to TikZ/PGF paths that can be included in LaTeX source code (using e.g. the inkscape2tikz extension).

share|improve this answer
    
I really like this one, unfortunately I don't have access to Adobe Illustrator. Are there any other tools which can do this? –  Velox Dec 20 '13 at 15:53
    
@Velox: I updated the answer. –  Frank Seifert Dec 21 '13 at 12:30

Here are two approaches. In the first, I use the actual @ character, but when I write it out, I overlay it with some really tiny white text. Thus, during the copy/paste of the PDF, you get the extra text as part of the copy:

\documentclass{article}
\usepackage{stackengine}
\usepackage{graphicx}
\usepackage{xcolor}
\def\fauxat{\stackinset{c}{}{c}{}{\color{white}\scalebox{.01}{foobar}}{@}}
\parindent 0pt
\begin{document}
Using the actual symbol, @,\\
mailto:name\fauxat domain.tld\\
in the PDF copy/paste, appears as\\
``mailto:name@foobar domain.tld''
\end{document}

enter image description here

In this second approach, I avoid the use of the @ symbol, but that means that I must create something that looks reasonably like an @ symbol by overlaying an italic a inside a sans-serif O. That way, when it is copied from the PDF, there is no @ in the copy.

\documentclass{article}
\usepackage{stackengine}
\usepackage{graphicx}
\def\fauxat{\raisebox{-1.4pt}{\stackinset{c}{-.4pt}{c}{}{%
  \scalebox{.92}{\itshape{a}}}{\textsf{O}}}}
\parindent 0pt
\begin{document}
mailto:name\fauxat domain.tld

in the PDF copy/paste, appears as\\
``mailto:nameOa domain.tld``
\end{document}

enter image description here

share|improve this answer
    
Seems like it would work, but I'll hold off for now until I see what alternative there are. –  Velox Dec 20 '13 at 15:55
    
That first option seems like it would be the best compromise between obfuscating the address for spam-crawlers and accessibility, especially if the "foobar " was replaced by something that would make more sense to someone using a screenreader for example. –  Chris H Mar 31 at 12:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.