node.js

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