{"action":"created","issue":{"url":"https://api.github.com/repos/smalot/pdfparser/issues/103","repository_url":"https://api.github.com/repos/smalot/pdfparser","labels_url":"https://api.github.com/repos/smalot/pdfparser/issues/103/labels{/name}","comments_url":"https://api.github.com/repos/smalot/pdfparser/issues/103/comments","events_url":"https://api.github.com/repos/smalot/pdfparser/issues/103/events","html_url":"https://github.com/smalot/pdfparser/issues/103","id":153984857,"number":103,"title":"Text parsing returns garbage","user":{"login":"natinusala","id":1159464,"avatar_url":"https://avatars.githubusercontent.com/u/1159464?v=3","gravatar_id":"","url":"https://api.github.com/users/natinusala","html_url":"https://github.com/natinusala","followers_url":"https://api.github.com/users/natinusala/followers","following_url":"https://api.github.com/users/natinusala/following{/other_user}","gists_url":"https://api.github.com/users/natinusala/gists{/gist_id}","starred_url":"https://api.github.com/users/natinusala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/natinusala/subscriptions","organizations_url":"https://api.github.com/users/natinusala/orgs","repos_url":"https://api.github.com/users/natinusala/repos","events_url":"https://api.github.com/users/natinusala/events{/privacy}","received_events_url":"https://api.github.com/users/natinusala/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-05-10T11:34:10Z","updated_at":"2016-07-17T20:21:57Z","closed_at":null,"body":"Hello,\r\n\r\nI've tried to parse [this PDF](http://nederland.ligtin.eu/sthoolen/20140416-Algemene%20bepalingen%20huurovereenkomst%20woonruimte.pdf) from the `samples/bugs` folder of the repo. \r\n\r\nUsing the code you provided : \r\n\r\n    $parser = new \\Smalot\\PdfParser\\Parser();\r\n    $pdf = $parser->parseFile($file);\r\n    return $pdf->getText();\r\n\r\nI got this : \r\n\r\n```\r\n24\r\n$/*\\(0\\(1\r\n\u0003\r\n\u0003\r\n0RGHO\u0003GRRU\u0003GH\u00035DDG\u0003YRRU\u00032QURHUHQGH\u0003=DNHQ\u0003\u000B52=\f\u0003RS\u0003\u0016\u0013\u0003MXOL\u0003\u0015\u0013\u0013\u0016\u0003YDVWJHVWHOG\u0003HQ\u0003RS\u0003\u0016\u0014\u0003MXOL\u0003\u0015\u0013\u0013\u0016\u0003JHGHSRQHHUG\u0003ELM\u0003GH\u0003JULIILH\u0003YDQ\u0003GH\u0003UHFKWEDQN\u0003WH\u0003'HQ\u0003\r\n+DDJ\u0003HQ\u0003DOGDDU\u0003LQJHVFKUHYHQ\u0003RQGHU\u0003QXPPHU\u0003\u001A\u0017\u0012\u0015\u0013\u0013\u0016\u0011\u0003,HGHUH\u0003DDQVSUDNHOLMNKHLG\u0003YRRU\u0003QDGHOLJH\u0003JHYROJHQ\u0003YDQ\u0003KHW\u0003JHEUXLN\u0003YDQ\u0003GH\u0003WHNVW\u0003YDQ\u0003KHW\u0003PRGHO\u0003\r\nZRUGW\u0003GRRU\u0003GH\u000352=\u0003XLWJHVORWHQ\u0011\u0003\u0003\r\n\u0003\r\n*\r\n\\024\\021\\024+XXUGHU\u0003 GLHQW\u0003 KHW\u0003 JHKXXUGH\u0003 \u0010\u0003 JHGXUHQGH\u0003 GH\u0003 JHKHOH\u0003 GXXU\u0003 YDQ\u0003 GH\u0003 RYHUHHQNRPVW\u0003 \u0010\u0003 GDDGZHUNHOLMN\u000F\u0003 EHKRRUOLMN\u0003 HQ\u0003 ]HOI\u0003 WH\u0003\r\nJHEUXLNHQ\u0003 XLWVOXLWHQG\u0003 RYHUHHQNRPVWLJ\u0003 GH\u0003 LQ\u0003 GH\u0003 KXXURYHUHHQNRPVW\u0003 DDQJHJHYHQ\u0003 EHVWHPPLQJ\u0003 HQ\u0003 PHW\u0003 LQDFKWQHPLQJ\u0003 YDQ\u0003\r\nEHVWDDQGH\u0003 EHSHUNWH\u0003 UHFKWHQ\u0003 HQ\u0003 GH\u0003 YDQ\u0003 RYHUKHLGVZHJH\u000F\u0003 EUDQGZHHU\u0003 HQ\u0003 GH\u0003 QXWVEHGULMYHQ\u0003 JHVWHOGH\u0003 RI\u0003 QRJ\u0003 WH\u0003 VWHOOHQ\u0003 HLVHQ\u0003\r\nWHQ\u0003 DDQ]LHQ\u0003 YDQ\u0003 KHW\u0003 JHEUXLN\u0003 YDQ\u0003 KHW\u0003 JHKXXUGH\u0011\u0003 2QGHU\u0003 QXWVEHGULMYHQ\u0003 ZRUGW\u0003 WHYHQV\u0003YHUVWDDQ\u0003VRRUWJHOLMNH\u0003EHGULMYHQ\u0003GLH\u0003]LFK\u0003\r\nEH]LJKRXGHQ\u0003 PHW\u0003 GH\u0003 OHYHULQJ\u000F\u0003 KHW\u0003 WUDQVSRUW\u0003 HQ\u0003 GH\u0003 PHWLQJ\u0003 YDQ\u0003 KHW\u0003 YHUEUXLN\u0003 YDQ\u0003 HQHUJLH\u000F\u0003 ZDWHU\u0003 HQ\u0003 GHUJHOLMNH\u0011\u0003 7HQ]LM\u0003 HU\u0003 ELM\u0003\r\nDDQYDQJ\u0003 YDQ\u0003 GH\u0003 KXXURYHUHHQNRPVW\u0003 VSUDNH\u0003 LV\u0003 YDQ\u0003 YHUKXXU\u0003 YDQ\u0003 JHVWRIIHHUGH\u0003 HQ\u0012RI\u0003 JHPHXELOHHUGH\u0003 ZRRQUXLPWH\u000F\u0003 GLHQW\u0003\r\nKXXUGHU\u0003 KHW\u0003 JHKXXUGH\u0003 ELM\u0003 DDQYDQJ\u0003 YDQ\u0003 GH\u0003 KXXU\u0003 WH\u0003 VWRIIHUHQ\u0003 HQ\u0003 WH\u0003 PHXELOHUHQ\u0011\u0003 +XXUGHU\u0003 ]DO\u0003 KHW\u0003 JHKXXUGH\u0003 YROGRHQGH\u0003\r\nJHVWRIIHHUG\u0003HQ\u0003JHPHXELOHHUG\u0003KRXGHQ\u0011\u0003\r\n\\024\\021\\025+XXUGHU\r\n```\r\n\r\nWhich is obviously wrong. Am I missing something (encoding) ? Or is this a bug from the library ?\r\n\r\nThanks !"},"comment":{"url":"https://api.github.com/repos/smalot/pdfparser/issues/comments/233201867","html_url":"https://github.com/smalot/pdfparser/issues/103#issuecomment-233201867","issue_url":"https://api.github.com/repos/smalot/pdfparser/issues/103","id":233201867,"user":{"login":"natinusala","id":1159464,"avatar_url":"https://avatars.githubusercontent.com/u/1159464?v=3","gravatar_id":"","url":"https://api.github.com/users/natinusala","html_url":"https://github.com/natinusala","followers_url":"https://api.github.com/users/natinusala/followers","following_url":"https://api.github.com/users/natinusala/following{/other_user}","gists_url":"https://api.github.com/users/natinusala/gists{/gist_id}","starred_url":"https://api.github.com/users/natinusala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/natinusala/subscriptions","organizations_url":"https://api.github.com/users/natinusala/orgs","repos_url":"https://api.github.com/users/natinusala/repos","events_url":"https://api.github.com/users/natinusala/events{/privacy}","received_events_url":"https://api.github.com/users/natinusala/received_events","type":"User","site_admin":false},"created_at":"2016-07-17T20:21:57Z","updated_at":"2016-07-17T20:21:57Z","body":"I forgot to mention that it works for some PDFs and it doesn't for some."}}
{"actor":{"display_login":"natinusala"}}