I have been working since yesterday to generate the report in Pdf format. I have gone through pdfkit module. And It seems pretty cool to use. My requirement is list the text with bullet point. I have tried like this
var doc = new PDFDocument();
doc.pipe(fs.createWriteStream('userReport.pdf'));
doc.fillColor("#B22222")
.fontSize(25)
.text('Users Count', 250,60)
.moveDown(0.5);
It is creating the text but I want the text with bullet. How to do this?
I have been working since yesterday to generate the report in Pdf format. I have gone through pdfkit module. And It seems pretty cool to use. My requirement is list the text with bullet point. I have tried like this
var doc = new PDFDocument();
doc.pipe(fs.createWriteStream('userReport.pdf'));
doc.fillColor("#B22222")
.fontSize(25)
.text('Users Count', 250,60)
.moveDown(0.5);
It is creating the text but I want the text with bullet. How to do this?
Share Improve this question edited Sep 3, 2015 at 19:55 halfer 20.5k19 gold badges109 silver badges202 bronze badges asked Aug 27, 2015 at 7:35 PrabuPrabu 1653 silver badges14 bronze badges2 Answers
Reset to default 5// list params: array, x, y, other params
doc.list([1, 2, 3], 50, 50, {
// this is how automatic line wrapping will work if the width is specified
width: 100,
align: 'left',
listType: 'bullet',
bulletRadius: 0.01, // use this value to almost hide the dots/bullets
});
This is how it works for me, I hope it helps someone
Simply, for listing
.list()
You may check some samples at
https://github./devongovett/pdfkit/tree/master/docs