{"action":"created","issue":{"url":"https://api.github.com/repos/mozilla/pdf.js/issues/5972","labels_url":"https://api.github.com/repos/mozilla/pdf.js/issues/5972/labels{/name}","comments_url":"https://api.github.com/repos/mozilla/pdf.js/issues/5972/comments","events_url":"https://api.github.com/repos/mozilla/pdf.js/issues/5972/events","html_url":"https://github.com/mozilla/pdf.js/issues/5972","id":71345151,"number":5972,"title":"Extreme (or maybe normal) charSpacing does not calculate correctly","user":{"login":"kalley","id":289053,"avatar_url":"https://avatars.githubusercontent.com/u/289053?v=3","gravatar_id":"","url":"https://api.github.com/users/kalley","html_url":"https://github.com/kalley","followers_url":"https://api.github.com/users/kalley/followers","following_url":"https://api.github.com/users/kalley/following{/other_user}","gists_url":"https://api.github.com/users/kalley/gists{/gist_id}","starred_url":"https://api.github.com/users/kalley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kalley/subscriptions","organizations_url":"https://api.github.com/users/kalley/orgs","repos_url":"https://api.github.com/users/kalley/repos","events_url":"https://api.github.com/users/kalley/events{/privacy}","received_events_url":"https://api.github.com/users/kalley/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mozilla/pdf.js/labels/4-text-selection","name":"4-text-selection","color":"DDDDDD"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-04-27T17:08:03Z","updated_at":"2015-04-29T15:06:23Z","closed_at":null,"body":"In order to get highlighting correctly on OCR documents, we are sizing text to the bounding box also using charSpacing to ensure the fit. On some documents where there is extreme negative charSpacing, the measurement of the text in the evaluator is incorrect.  In our case, the charSpacing for the word in question is set to -7.92475.\r\n\r\nHere is the original document:\r\nhttps://drive.google.com/file/d/0B7gKNRUF3HwvTXpYSkx1WldSeFE/view?usp=sharing\r\n\r\nHere's a version of the pdf with the OCR'ed text overlaid in the bounding box:\r\nhttps://drive.google.com/file/d/0B7gKNRUF3HwvenRmTnBLanVlckk/view?usp=sharing\r\n\r\nAnd here's a screenshot of the selected text after pdfjs has rendered the document:\r\n![image](https://cloud.githubusercontent.com/assets/289053/7352885/dc8b298a-ecd4-11e4-82d6-c690b9dd6a77.png)\r\n\r\nIt is really the \"Foreword\" text that we're looking at, as everything else is at least close enough to not be noticeable. I have verified that the text rendered is matched to the width returned from pdfjs."},"comment":{"url":"https://api.github.com/repos/mozilla/pdf.js/issues/comments/97458760","html_url":"https://github.com/mozilla/pdf.js/issues/5972#issuecomment-97458760","issue_url":"https://api.github.com/repos/mozilla/pdf.js/issues/5972","id":97458760,"user":{"login":"kalley","id":289053,"avatar_url":"https://avatars.githubusercontent.com/u/289053?v=3","gravatar_id":"","url":"https://api.github.com/users/kalley","html_url":"https://github.com/kalley","followers_url":"https://api.github.com/users/kalley/followers","following_url":"https://api.github.com/users/kalley/following{/other_user}","gists_url":"https://api.github.com/users/kalley/gists{/gist_id}","starred_url":"https://api.github.com/users/kalley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kalley/subscriptions","organizations_url":"https://api.github.com/users/kalley/orgs","repos_url":"https://api.github.com/users/kalley/repos","events_url":"https://api.github.com/users/kalley/events{/privacy}","received_events_url":"https://api.github.com/users/kalley/received_events","type":"User","site_admin":false},"created_at":"2015-04-29T15:06:23Z","updated_at":"2015-04-29T15:06:23Z","body":"yep."}}