1 | var pdfinfo = require('./index'),
|
2 | pdf = new pdfinfo(__dirname + '/test/pdfs/ruby.pdf');
|
3 |
|
4 | pdf.getInfo(function(err, info, params) {
|
5 | if (err) {
|
6 | console.log(err);
|
7 | }
|
8 | console.log(info);
|
9 | });
|
10 |
|
11 | var pdfinfo = require('./index'),
|
12 | pdf = new pdfinfo('tests/pdfs/sample.pdf');
|
13 |
|
14 | pdf.getInfo(function(err, info, params) {
|
15 | if (err) {
|
16 | console.error(err.stack);
|
17 | }
|
18 | else {
|
19 | console.log(info); //info is an object
|
20 | console.log(params); // commandline params passed to pdfinfo cmd
|
21 | }
|
22 | });
|
23 |
|