Install Node.js
wget http://nodejs.org/dist/v0.10.5/node-v0.10.5.tar.gz
./configure
make
make Install
Create a http webserver
Awesome tools use node
pdftest.js (run command node pdftest.js
)
var PDFDocument = require('pdfkit'),
doc = new PDFDocument();
doc.moveTo(300, 75)
.lineTo(373, 301)
.lineTo(181, 161)
.lineTo(419, 161)
.lineTo(227, 301)
.fill('red', 'even-odd');
var loremIpsum = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam in...';
doc.y = 320;
doc.fillColor('black')
.text(loremIpsum, {
paragraphGap: 10,
indent: 20,
align: 'justify',
columns: 2
});
doc.write('out.pdf');
Referece
- The Wiki
- nodejs.org
- The Node Beginner Book
- Node入门★★★
- Understanding node.js
- Projects, Applications, and Companies Using Node
- Introduction to PDFKit
- 简单介绍并实现一个简单的Web MVC框架
- how to install node.js and npm (node package manager)
- list of modules
- list of companies and projects using node
- node.js mailing list
- community