sancaruso / pdf-generator Goto Github PK
View Code? Open in Web Editor NEWGenerate a pdf from json data and a template
Generate a pdf from json data and a template
Hi Team,
I am trying to use this pdf generator where I have to create a table dynamically. Can you please let me know if that capability is there to pass array in the data model and how to read that array from template?
If I run the pdf-generator example (from npmjs.com) I get an error:
var pdfGenerator = require("template-pdf-generator");
var fs = require("fs");
var data = { name: "World"};
var template = "<h1>Hello {{name}}</h1>";
var css = "h1 {color: red}";
pdfGenerator(data, template, css).pipe(fs.createWriteStream("out.pdf"));
Error: write EPIPE
at _errnoException (util.js:992:11)
at Socket._writeGeneric (net.js:764:25)
at Socket._write (net.js:783:8)
at doWrite (_stream_writable.js:397:12)
at writeOrBuffer (_stream_writable.js:383:5)
at Socket.Writable.write (_stream_writable.js:290:11)
at Socket.write (net.js:707:40)
at Socket.Writable.end (_stream_writable.js:563:10)
at Socket.end (net.js:499:31)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.