{"action":"created","issue":{"url":"https://api.github.com/repos/Gottox/node-pdfutils/issues/18","labels_url":"https://api.github.com/repos/Gottox/node-pdfutils/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/Gottox/node-pdfutils/issues/18/comments","events_url":"https://api.github.com/repos/Gottox/node-pdfutils/issues/18/events","html_url":"https://github.com/Gottox/node-pdfutils/issues/18","id":39630912,"number":18,"title":"crash on truncated file","user":{"login":"yukulele","id":347244,"avatar_url":"https://avatars.githubusercontent.com/u/347244?v=3","gravatar_id":"","url":"https://api.github.com/users/yukulele","html_url":"https://github.com/yukulele","followers_url":"https://api.github.com/users/yukulele/followers","following_url":"https://api.github.com/users/yukulele/following{/other_user}","gists_url":"https://api.github.com/users/yukulele/gists{/gist_id}","starred_url":"https://api.github.com/users/yukulele/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yukulele/subscriptions","organizations_url":"https://api.github.com/users/yukulele/orgs","repos_url":"https://api.github.com/users/yukulele/repos","events_url":"https://api.github.com/users/yukulele/events{/privacy}","received_events_url":"https://api.github.com/users/yukulele/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2014-08-06T15:13:02Z","updated_at":"2015-02-03T14:46:17Z","closed_at":null,"body":"wen pdfutils is called on truncated file (for example, during FTP upload) it should emit an error but it simply crash.\r\n\r\nmessage show before crash:\r\n```\r\nError: PDF file is damaged - attempting to reconstruct xref table...\r\nError: Couldn't find trailer dictionary\r\nError: Couldn't read xref table\r\n\r\n(process:13600): Poppler-CRITICAL **: int poppler_document_get_n_pages(PopplerDocument*): assertion `POPPLER_IS_DOCUMENT (document)' failed\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/Gottox/node-pdfutils/issues/comments/72662079","html_url":"https://github.com/Gottox/node-pdfutils/issues/18#issuecomment-72662079","issue_url":"https://api.github.com/repos/Gottox/node-pdfutils/issues/18","id":72662079,"user":{"login":"ghusse","id":527245,"avatar_url":"https://avatars.githubusercontent.com/u/527245?v=3","gravatar_id":"","url":"https://api.github.com/users/ghusse","html_url":"https://github.com/ghusse","followers_url":"https://api.github.com/users/ghusse/followers","following_url":"https://api.github.com/users/ghusse/following{/other_user}","gists_url":"https://api.github.com/users/ghusse/gists{/gist_id}","starred_url":"https://api.github.com/users/ghusse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghusse/subscriptions","organizations_url":"https://api.github.com/users/ghusse/orgs","repos_url":"https://api.github.com/users/ghusse/repos","events_url":"https://api.github.com/users/ghusse/events{/privacy}","received_events_url":"https://api.github.com/users/ghusse/received_events","type":"User","site_admin":false},"created_at":"2015-02-03T14:46:16Z","updated_at":"2015-02-03T14:46:16Z","body":"I have the same issue, I tested master with no luck:\r\n\r\n     Error: May not be a PDF file (continuing anyway)\r\n     Error (2): Illegal character <21> in hex string\r\n     Error (4): Illegal character <4f> in hex string\r\n     [...]\r\n     Error: PDF file is damaged - attempting to reconstruct xref table...\r\n     Error: Couldn't find trailer dictionary\r\n     Error: Couldn't read xref table\r\n     (process:1363): Poppler-CRITICAL **: int poppler_document_get_n_pages(PopplerDocument*): assertion `POPPLER_IS_DOCUMENT (document)' failed\r\n     Erreur de segmentation\r\n"}}