I have found this post that explains how to extract the text from a pdf in javascript, but I would like to know if it's possible to extract only the text selected by the user.
            Asked
            
        
        
            Active
            
        
            Viewed 294 times
        
    1 Answers
2
            
            
        You can not.
The PDF, unless it's being rendered by a javascript renderer (as-in, pdf.js), can not be accessed at all by the browser's javascript.
This is because it's being rendered by a browser plugin that the javascript is intentionally not allowed to access.
Your post is tagged with "google-chrome-extension" and "google-chrome" but your question does not mention these. You might not be asking a specific enough question.
 
    
    
        Joseph Lennox
        
- 3,202
- 1
- 27
- 25
- 
                    Thank you for your answer. I should precise it's for a chrome extension, so maybe it's possible with the chrome api? – JMaylin Jul 21 '13 at 17:37
 
    