{"action":"created","issue":{"url":"https://api.github.com/repos/pts/pdfsizeopt/issues/94","repository_url":"https://api.github.com/repos/pts/pdfsizeopt","labels_url":"https://api.github.com/repos/pts/pdfsizeopt/issues/94/labels{/name}","comments_url":"https://api.github.com/repos/pts/pdfsizeopt/issues/94/comments","events_url":"https://api.github.com/repos/pts/pdfsizeopt/issues/94/events","html_url":"https://github.com/pts/pdfsizeopt/issues/94","id":343610043,"node_id":"MDU6SXNzdWUzNDM2MTAwNDM=","number":94,"title":"PDF Sign error","user":{"login":"JhonGH","id":29483470,"node_id":"MDQ6VXNlcjI5NDgzNDcw","avatar_url":"https://avatars0.githubusercontent.com/u/29483470?v=4","gravatar_id":"","url":"https://api.github.com/users/JhonGH","html_url":"https://github.com/JhonGH","followers_url":"https://api.github.com/users/JhonGH/followers","following_url":"https://api.github.com/users/JhonGH/following{/other_user}","gists_url":"https://api.github.com/users/JhonGH/gists{/gist_id}","starred_url":"https://api.github.com/users/JhonGH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JhonGH/subscriptions","organizations_url":"https://api.github.com/users/JhonGH/orgs","repos_url":"https://api.github.com/users/JhonGH/repos","events_url":"https://api.github.com/users/JhonGH/events{/privacy}","received_events_url":"https://api.github.com/users/JhonGH/received_events","type":"User","site_admin":false},"labels":[{"id":57866192,"node_id":"MDU6TGFiZWw1Nzg2NjE5Mg==","url":"https://api.github.com/repos/pts/pdfsizeopt/labels/question","name":"question","color":"cc317c","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-23T12:21:43Z","updated_at":"2018-07-23T13:15:29Z","closed_at":"2018-07-23T13:15:29Z","author_association":"NONE","body":"Hi,\r\nI am facing with an error during the sign process of a reduced pdf.\r\nAfter reducing its size with pdfsizeopt latest release, I need to digitally sign the file, but the following error appears:\r\n\r\n`exception in thread \"main\" java.lang.NullPointerException'\r\n           at com.lowagie.text.pdf.PdfReader.readPages(Unknown Source)\r\n           at com.lowagie.text.pdf.PdfReader.readPdf(Unknown Source)\r\n           at com.lowagie.text.pdf.PdfReader.<init>(Unknown Source)`\r\n\r\nI tried some flags (e.g. `--do-optimize-obj-heads`) with no success.\r\nTo sign I am using a java library with a modified version of iText 1.4.\r\nThe pdf file that I have problem with is about 7500 pages and 200MB.\r\n\r\nA tip: Using Acrobat Reader, after opening and saving the compressed pdf, I can correctly  sign the file.\r\n\r\nCan it be a bug that you can try to fix with a new release?\r\nThanks\r\nJ\r\n"},"comment":{"url":"https://api.github.com/repos/pts/pdfsizeopt/issues/comments/407053817","html_url":"https://github.com/pts/pdfsizeopt/issues/94#issuecomment-407053817","issue_url":"https://api.github.com/repos/pts/pdfsizeopt/issues/94","id":407053817,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNzA1MzgxNw==","user":{"login":"pts","id":379746,"node_id":"MDQ6VXNlcjM3OTc0Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/379746?v=4","gravatar_id":"","url":"https://api.github.com/users/pts","html_url":"https://github.com/pts","followers_url":"https://api.github.com/users/pts/followers","following_url":"https://api.github.com/users/pts/following{/other_user}","gists_url":"https://api.github.com/users/pts/gists{/gist_id}","starred_url":"https://api.github.com/users/pts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pts/subscriptions","organizations_url":"https://api.github.com/users/pts/orgs","repos_url":"https://api.github.com/users/pts/repos","events_url":"https://api.github.com/users/pts/events{/privacy}","received_events_url":"https://api.github.com/users/pts/received_events","type":"User","site_admin":false},"created_at":"2018-07-23T13:15:29Z","updated_at":"2018-07-23T13:15:29Z","author_association":"OWNER","body":"Thank you for reporting this!\r\n\r\nThis is most probably a bug in the Java library you are using. Even if the PDF created by pdfsizeopt is broken, the Java library should report a meaningful error message rather than `java.lang.NullPointerException`. You may want to report this bug to the authors of the Java library.\r\n\r\nYou may want to try signing a smaller PDF, e.g. only page 1 of the original, and see if it succeeds or not. Report the bug with the smallest possible PDF which fails.\r\n\r\nIt's nice that Acrobat Reader is able to fix the PDF created by pdfsizeopt for you. I understand that it would be nicer that pdfsizeopt had a command-line flag which would cause the creation of a PDF which doesn't need fixing. To get this, we need to investigate and understand which feature of the PDF makes your Java library fail. (I can do this, but I'll quote my regular hourly rate for this work. You have to provide the input PDF file, the .jar file of your Java library and the command line with which you do the signing. Find my e-mail address in the git log if you are interested in this. Please don't attach files to the e-mail.) After understanding it, I can easily add the flag to pdfsizeopt (for free).\r\n\r\nI'm closing this issue now. I'll reopen it as soon as someone adds the missing info (which feature of the PDF makes your java library fail) as a comment."}}
{"actor":{"display_login":"pts"}}