xcd-pdf
v0.0.13
Published
A simple application for manuplating the pdf for Node.js.
Downloads
20
Readme
xcd-pdf
Install
npm install xcd-pdf
Or, install it globally:
sudo npm install xcd-pdf -g
To update with latest version:
sudo npm update xcd-pdf -g
Code Example
// Getting the cordinates of texts
var XcdPdf = require('./index.js');
var xcdPdf = new XcdPdf();
var option = {
pdfFile : './response.pdf',
text : ['text1', 'text2','text3']
}
xcdPdf.getTextCordinates(option, function(err, data){
console.log(err, JSON.stringify(data))
});
// Change the color of the texts
var XcdPdf = require('./index.js');
var xcdPdf = new XcdPdf();
var option = {
pdfFile : './response.pdf',
outputFile : './output.pdf',
text : ['text1', 'text2','text3'],
color : 'Red'
}
xcdPdf.changeTextColor(option, function(err, data){
console.log(err, JSON.stringify(data))
});
// Get the pdf details
var XcdPdf = require('./index.js');
var xcdPdf = new XcdPdf();
var option = {
pdfFile : './response.pdf'
}
xcdPdf.getPageDetails(option, function(err, data){
console.log(err, JSON.stringify(data))
});