You can call the copy command from the first responder using this code:
[[UIApplication sharedApplication] sendAction:@selector(copy:) to:nil from:self forEvent:nil];
Then you can simply remove it from the cardboard:
[UIPasteboard generalPasteboard].string;
This is apparently the only way to get selected text from a UIWebView that displays PDF, javascript methods will not work with PDF files, but only with HTML.
source
share