html tag
This commit is contained in:
@@ -8,8 +8,6 @@ async function makePdf(data) {
|
||||
let options = { format: 'A4' };
|
||||
let template = {
|
||||
content: `<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<style>
|
||||
// @media print {
|
||||
@@ -244,7 +242,6 @@ async function makePdf(data) {
|
||||
</html>` };
|
||||
|
||||
html_to_pdf.generatePdf(template, options).then(pdfBuffer => {
|
||||
// console.log("PDF Buffer:-", pdfBuffer);
|
||||
fs.writeFile(`reports/${data._id}.pdf`, pdfBuffer, "binary", function (err) {
|
||||
if (err) {
|
||||
console.log(err);
|
||||
@@ -266,10 +263,6 @@ fs.createReadStream("data/result.csv")
|
||||
.on('data', function(data){
|
||||
try {
|
||||
console.log("id: " + data._id);
|
||||
// console.log("Age is: "+data.Age);
|
||||
|
||||
//perform the operation
|
||||
|
||||
users.push(data);
|
||||
}
|
||||
catch(err) {
|
||||
@@ -277,7 +270,6 @@ fs.createReadStream("data/result.csv")
|
||||
}
|
||||
})
|
||||
.on('end', async function(){
|
||||
//some final operation
|
||||
console.log('size ', users.length);
|
||||
|
||||
for (let i = 0; i < users.length; i++) {
|
||||
|
||||
Reference in New Issue
Block a user