{"action":"created","issue":{"url":"https://api.github.com/repos/galkahana/HummusJS/issues/131","repository_url":"https://api.github.com/repos/galkahana/HummusJS","labels_url":"https://api.github.com/repos/galkahana/HummusJS/issues/131/labels{/name}","comments_url":"https://api.github.com/repos/galkahana/HummusJS/issues/131/comments","events_url":"https://api.github.com/repos/galkahana/HummusJS/issues/131/events","html_url":"https://github.com/galkahana/HummusJS/issues/131","id":200998674,"number":131,"title":"write on second page","user":{"login":"romainkoenig","id":6191723,"avatar_url":"https://avatars.githubusercontent.com/u/6191723?v=3","gravatar_id":"","url":"https://api.github.com/users/romainkoenig","html_url":"https://github.com/romainkoenig","followers_url":"https://api.github.com/users/romainkoenig/followers","following_url":"https://api.github.com/users/romainkoenig/following{/other_user}","gists_url":"https://api.github.com/users/romainkoenig/gists{/gist_id}","starred_url":"https://api.github.com/users/romainkoenig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romainkoenig/subscriptions","organizations_url":"https://api.github.com/users/romainkoenig/orgs","repos_url":"https://api.github.com/users/romainkoenig/repos","events_url":"https://api.github.com/users/romainkoenig/events{/privacy}","received_events_url":"https://api.github.com/users/romainkoenig/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-01-16T11:47:22Z","updated_at":"2017-01-18T09:38:32Z","closed_at":"2017-01-18T09:38:32Z","body":"Hello I have used your package to write some text on a existing PDF and it works well.\r\nToday I added a second page and I tried to modify it. But I am not sure how to to that.\r\n````js\r\n  res.setHeader('Content-disposition', `attachment; filename=name.pdf`);\r\n  res.writeHead(200, { 'Content-Type': 'application/pdf' });\r\n  // Hummus packages :\r\n   const pdfWriter = hummus.createWriterToModify(\r\n    new hummus.PDFRStreamForFile(`${dirPath}/mypdf.pdf`),\r\n    new hummus.PDFStreamForResponse(res));\r\n\r\n  const style = {...};\r\n\r\n  const pageModifier = new hummus.PDFPageModifier(pdfWriter, 0);\r\n  for (const input of data) {\r\n    pageModifier.startContext().getContext().writeText(\r\n      input.text, input.pointX, input.pointY, style);\r\n  }\r\n  pageModifier.endContext().writePage();\r\n  pdfWriter.end();\r\n\r\n  res.end();\r\n````\r\nWhen I set ( X : 0, Y : 0 ) I got the text at the very bottom left of the page ( origin of the axis ). So I naively put some negative value in the Y axis, but with no success. I couldn't find a 'page' parameter on the writeText function neither.\r\nDo you know if that behavior is possible ?  Or should I find an other way ? "},"comment":{"url":"https://api.github.com/repos/galkahana/HummusJS/issues/comments/273428103","html_url":"https://github.com/galkahana/HummusJS/issues/131#issuecomment-273428103","issue_url":"https://api.github.com/repos/galkahana/HummusJS/issues/131","id":273428103,"user":{"login":"romainkoenig","id":6191723,"avatar_url":"https://avatars.githubusercontent.com/u/6191723?v=3","gravatar_id":"","url":"https://api.github.com/users/romainkoenig","html_url":"https://github.com/romainkoenig","followers_url":"https://api.github.com/users/romainkoenig/followers","following_url":"https://api.github.com/users/romainkoenig/following{/other_user}","gists_url":"https://api.github.com/users/romainkoenig/gists{/gist_id}","starred_url":"https://api.github.com/users/romainkoenig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romainkoenig/subscriptions","organizations_url":"https://api.github.com/users/romainkoenig/orgs","repos_url":"https://api.github.com/users/romainkoenig/repos","events_url":"https://api.github.com/users/romainkoenig/events{/privacy}","received_events_url":"https://api.github.com/users/romainkoenig/received_events","type":"User","site_admin":false},"created_at":"2017-01-18T09:38:32Z","updated_at":"2017-01-18T09:38:32Z","body":"Oh yes... I see it now, I wasn't focusing on the good function \r\n````js\r\nconst pageModifier = new hummus.PDFPageModifier(pdfWriter, 1); // <- 1 !!!\r\n````\r\nis what I was searching for ! Thanks for your time ... "}}
{"actor":{"display_login":"romainkoenig"}}