{"action":"created","issue":{"url":"https://api.github.com/repos/izuzak/atom-pdf-view/issues/7","labels_url":"https://api.github.com/repos/izuzak/atom-pdf-view/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/izuzak/atom-pdf-view/issues/7/comments","events_url":"https://api.github.com/repos/izuzak/atom-pdf-view/issues/7/events","html_url":"https://github.com/izuzak/atom-pdf-view/issues/7","id":32811878,"number":7,"title":"Text selection and copy/paste support","user":{"login":"izuzak","id":38924,"avatar_url":"https://avatars.githubusercontent.com/u/38924?v=3","gravatar_id":"","url":"https://api.github.com/users/izuzak","html_url":"https://github.com/izuzak","followers_url":"https://api.github.com/users/izuzak/followers","following_url":"https://api.github.com/users/izuzak/following{/other_user}","gists_url":"https://api.github.com/users/izuzak/gists{/gist_id}","starred_url":"https://api.github.com/users/izuzak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/izuzak/subscriptions","organizations_url":"https://api.github.com/users/izuzak/orgs","repos_url":"https://api.github.com/users/izuzak/repos","events_url":"https://api.github.com/users/izuzak/events{/privacy}","received_events_url":"https://api.github.com/users/izuzak/received_events","type":"User","site_admin":true},"labels":[{"url":"https://api.github.com/repos/izuzak/atom-pdf-view/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/izuzak/atom-pdf-view/labels/help%20wanted","name":"help wanted","color":"159818"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2014-05-05T14:09:38Z","updated_at":"2015-11-06T03:45:04Z","closed_at":null,"body":"Currently, it's possible to view and scroll the PDF only. It might be useful to have the ability to select and copy/paste text.\r\n\r\nPDF.js supports this with an overlay on top of the canvas used for rendering (as shown in [the demo](http://mozilla.github.io/pdf.js/web/viewer.html)), so it _should_ be possible to make it work for Atom as well. :hammer: :scissors: :fork_and_knife: "},"comment":{"url":"https://api.github.com/repos/izuzak/atom-pdf-view/issues/comments/154276837","html_url":"https://github.com/izuzak/atom-pdf-view/issues/7#issuecomment-154276837","issue_url":"https://api.github.com/repos/izuzak/atom-pdf-view/issues/7","id":154276837,"user":{"login":"lafickens","id":9373448,"avatar_url":"https://avatars.githubusercontent.com/u/9373448?v=3","gravatar_id":"","url":"https://api.github.com/users/lafickens","html_url":"https://github.com/lafickens","followers_url":"https://api.github.com/users/lafickens/followers","following_url":"https://api.github.com/users/lafickens/following{/other_user}","gists_url":"https://api.github.com/users/lafickens/gists{/gist_id}","starred_url":"https://api.github.com/users/lafickens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lafickens/subscriptions","organizations_url":"https://api.github.com/users/lafickens/orgs","repos_url":"https://api.github.com/users/lafickens/repos","events_url":"https://api.github.com/users/lafickens/events{/privacy}","received_events_url":"https://api.github.com/users/lafickens/received_events","type":"User","site_admin":false},"created_at":"2015-11-06T03:45:04Z","updated_at":"2015-11-06T03:45:04Z","body":"The text content that pdfjs returns is very fragmented - a single sentence, for example, can be divided into multiple objects depending on character size, fonts and other formatting attributes.\r\n\r\nApparently the way Mozilla deals with this is just creating div elements for each of the object, so that collectively the text layer still resembles the contents. While this would work for copying to Microsoft Word or TextEdit, it behaves abnormally in Atom as all text contents are aggregated into one single line, whitespaces and newlines mysteriously lost... [Mozilla's demo](http://mozilla.github.io/pdf.js/web/viewer.html) exhibits the same problem, and I'm still trying to find a solution.\r\n\r\nSo far I've only been able to get the text layer working. Copying any content from Atom to external text editor works with formatting preserved, but not within Atom if the destination is a TextEditor instance.\r\n\r\nIf needed, here's [link to my fork](https://github.com/lafickens/atom-pdf-view)."}}