{"action":"created","issue":{"url":"https://api.github.com/repos/mozilla/pdf.js/issues/6410","labels_url":"https://api.github.com/repos/mozilla/pdf.js/issues/6410/labels{/name}","comments_url":"https://api.github.com/repos/mozilla/pdf.js/issues/6410/comments","events_url":"https://api.github.com/repos/mozilla/pdf.js/issues/6410/events","html_url":"https://github.com/mozilla/pdf.js/issues/6410","id":104370161,"number":6410,"title":"Mangled text rendering (embedded TrueType font, WinAnsi encoding)","user":{"login":"pteichman","id":69112,"avatar_url":"https://avatars.githubusercontent.com/u/69112?v=3","gravatar_id":"","url":"https://api.github.com/users/pteichman","html_url":"https://github.com/pteichman","followers_url":"https://api.github.com/users/pteichman/followers","following_url":"https://api.github.com/users/pteichman/following{/other_user}","gists_url":"https://api.github.com/users/pteichman/gists{/gist_id}","starred_url":"https://api.github.com/users/pteichman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pteichman/subscriptions","organizations_url":"https://api.github.com/users/pteichman/orgs","repos_url":"https://api.github.com/users/pteichman/repos","events_url":"https://api.github.com/users/pteichman/events{/privacy}","received_events_url":"https://api.github.com/users/pteichman/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mozilla/pdf.js/labels/3-regression","name":"3-regression","color":"e10c02"},{"url":"https://api.github.com/repos/mozilla/pdf.js/labels/4-font-conversion","name":"4-font-conversion","color":"ededed"},{"url":"https://api.github.com/repos/mozilla/pdf.js/labels/4-font-truetype","name":"4-font-truetype","color":"DDDDDD"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-01T22:53:04Z","updated_at":"2015-09-07T09:54:47Z","closed_at":null,"body":"I'm generating PDFs that render correctly in OSX Preview and Chrome and display with incorrect characters in pdf.js. Copy & paste from pdf.js yields the expected text.\r\n\r\nYou can find an example file here:\r\nhttps://dl.dropboxusercontent.com/u/4565469/tmp/pdfjs-font-embed.pdf\r\n\r\nThe pdffonts output for this broken file shows:\r\n```\r\nname                                 type              encoding         emb sub uni object ID\r\n------------------------------------ ----------------- ---------------- --- --- --- ---------\r\nHelvetica                            Type 1            WinAnsi          no  no  no       3  0\r\nPFDinTextPro-Thin                    TrueType          WinAnsi          yes no  no       4  0\r\nDINEngschriftStd,Bold                TrueType          WinAnsi          yes no  no       5  0\r\nPFDinTextPro-Thin,Bold               TrueType          WinAnsi          yes no  no       6  0\r\nPFDinTextPro-Regular,Bold            TrueType          WinAnsi          yes no  no       7  0\r\nTRLucidaHandwritingItalic            TrueType          WinAnsi          yes no  no       8  0\r\n```\r\n\r\nAfter tweaking our PDF generation code, I've gotten a working render. pdffonts on the working file shows:\r\n```\r\nname                                 type              encoding         emb sub uni object ID\r\n------------------------------------ ----------------- ---------------- --- --- --- ---------\r\nHelvetica                            Type 1            WinAnsi          no  no  no       3  0\r\nPFDinTextPro-Thin                    CID TrueType      Identity-H       yes no  yes      4  0\r\nDINEngschriftStd,Bold                CID TrueType      Identity-H       yes no  yes      5  0\r\nPFDinTextPro-Thin,Bold               CID TrueType      Identity-H       yes no  yes      6  0\r\nPFDinTextPro-Regular,Bold            CID TrueType      Identity-H       yes no  yes      7  0\r\nTRLucidaHandwritingItalic            CID TrueType      Identity-H       yes no  yes      8  0\r\n```\r\n\r\nI've attached broken and expected output images for reference.\r\n![pdf-broken](https://cloud.githubusercontent.com/assets/69112/9619119/7d03bea4-50c1-11e5-86a5-98ce9957f38c.png)\r\n![pdf-expected](https://cloud.githubusercontent.com/assets/69112/9619121/7fd9a0a8-50c1-11e5-97d6-b18aaac55135.png)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/mozilla/pdf.js/issues/comments/138255864","html_url":"https://github.com/mozilla/pdf.js/issues/6410#issuecomment-138255864","issue_url":"https://api.github.com/repos/mozilla/pdf.js/issues/6410","id":138255864,"user":{"login":"Snuffleupagus","id":2692120,"avatar_url":"https://avatars.githubusercontent.com/u/2692120?v=3","gravatar_id":"","url":"https://api.github.com/users/Snuffleupagus","html_url":"https://github.com/Snuffleupagus","followers_url":"https://api.github.com/users/Snuffleupagus/followers","following_url":"https://api.github.com/users/Snuffleupagus/following{/other_user}","gists_url":"https://api.github.com/users/Snuffleupagus/gists{/gist_id}","starred_url":"https://api.github.com/users/Snuffleupagus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Snuffleupagus/subscriptions","organizations_url":"https://api.github.com/users/Snuffleupagus/orgs","repos_url":"https://api.github.com/users/Snuffleupagus/repos","events_url":"https://api.github.com/users/Snuffleupagus/events{/privacy}","received_events_url":"https://api.github.com/users/Snuffleupagus/received_events","type":"User","site_admin":false},"created_at":"2015-09-07T09:54:47Z","updated_at":"2015-09-07T09:54:47Z","body":"@pteichman Are you the creator of the PDF file, and if so can we include it in our test suite?"}}