{"action":"created","issue":{"url":"https://api.github.com/repos/bpampuch/pdfmake/issues/381","labels_url":"https://api.github.com/repos/bpampuch/pdfmake/issues/381/labels{/name}","comments_url":"https://api.github.com/repos/bpampuch/pdfmake/issues/381/comments","events_url":"https://api.github.com/repos/bpampuch/pdfmake/issues/381/events","html_url":"https://github.com/bpampuch/pdfmake/issues/381","id":103658888,"number":381,"title":"Server-side rendering","user":{"login":"Kuzmin","id":773926,"avatar_url":"https://avatars.githubusercontent.com/u/773926?v=3","gravatar_id":"","url":"https://api.github.com/users/Kuzmin","html_url":"https://github.com/Kuzmin","followers_url":"https://api.github.com/users/Kuzmin/followers","following_url":"https://api.github.com/users/Kuzmin/following{/other_user}","gists_url":"https://api.github.com/users/Kuzmin/gists{/gist_id}","starred_url":"https://api.github.com/users/Kuzmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kuzmin/subscriptions","organizations_url":"https://api.github.com/users/Kuzmin/orgs","repos_url":"https://api.github.com/users/Kuzmin/repos","events_url":"https://api.github.com/users/Kuzmin/events{/privacy}","received_events_url":"https://api.github.com/users/Kuzmin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-28T06:46:49Z","updated_at":"2015-09-04T21:24:54Z","closed_at":null,"body":"Would it be possible to have this export as a standard module so that we could also have server side PDF rendering in the cases where that is needed?"},"comment":{"url":"https://api.github.com/repos/bpampuch/pdfmake/issues/comments/137856780","html_url":"https://github.com/bpampuch/pdfmake/issues/381#issuecomment-137856780","issue_url":"https://api.github.com/repos/bpampuch/pdfmake/issues/381","id":137856780,"user":{"login":"psuhas","id":4852654,"avatar_url":"https://avatars.githubusercontent.com/u/4852654?v=3","gravatar_id":"","url":"https://api.github.com/users/psuhas","html_url":"https://github.com/psuhas","followers_url":"https://api.github.com/users/psuhas/followers","following_url":"https://api.github.com/users/psuhas/following{/other_user}","gists_url":"https://api.github.com/users/psuhas/gists{/gist_id}","starred_url":"https://api.github.com/users/psuhas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psuhas/subscriptions","organizations_url":"https://api.github.com/users/psuhas/orgs","repos_url":"https://api.github.com/users/psuhas/repos","events_url":"https://api.github.com/users/psuhas/events{/privacy}","received_events_url":"https://api.github.com/users/psuhas/received_events","type":"User","site_admin":false},"created_at":"2015-09-04T21:24:54Z","updated_at":"2015-09-04T21:24:54Z","body":"I have done it following way, \r\npdfmake is installed in node-modules folders with following command\r\n\r\nnpm install pdfmake\r\n\r\nThe code to generate the doc as :\r\n\r\n    var PdfPrinter = require('pdfmake/src/printer');\r\n    var printer = new PdfPrinter(fonts);\r\n\r\n    var dd = {\r\n\tcontent: [\r\n\t\t'First paragraph',\r\n\t\t'Another paragraph'\r\n\t]\r\n    }\r\n    var pdfDoc = printer.createPdfKitDocument(dd);\r\n    pdfDoc.pipe(fs.createWriteStream('basics.pdf')).on('finish',function(){\r\n\t\t//success\r\n    });\r\n    pdfDoc.end();\r\n"}}