# Can't copy certain characters (inverted commas) from pdf

I am using knitr to compile an rnw document containing both R and latex code, though it seems to also be a problem with the verbatim environment in general. The pdf looks fine, but when I try to copy and paste the code chunks, inverted commas are missing. I would like to be able to copy the code directly! It seems to only be a problem for some pdf readers - potentially only adobe reader - but would be good to be able to fix nevertheless. The following code compiles and displays as expected:

\documentclass{article}
\usepackage{textcomp}

\begin{document}
<<setup>>=
library(knitr)
@

<<test>>=
test <- 'trytocopythisfromthepdf'
@

\textquotesingle trytocopythisfromthepdf\textquotesingle

\verb+'trytocopythisfromthepdf'+
\end{document}

but when copying the text from adobe reader and pasting it, the single quotes from both the knitr block and verbatim environment are missing, though the upquotes from the textcomp package are fine:

library(knitr) test <- trytocopythisfromthepdf 'trytocopythisfromthepdf' trytocopythisfromthepdf

• I cannot reproduce this problem: Pasted from my PDF output using this MWE : test <- 'trytocopythisfromthepdf' – Fran Sep 2 '17 at 4:15
• Thanks. I double checked on another pc and it still happens, but using sumatra instead of adobe reader does let me copy the text properly. Would be good to get it working for adobe, given how common it is... – Charlie Sep 2 '17 at 9:55