Before use this module,you need install ImageMagick and Xpdf
1.Install ImageMagick
[root@localhost]:yum install -y ImageMagick
2.install Xpdf
eg : Centos 6.5 Installation
[root@localhost xpdf]# tar -zxvf xpdfbin-linux-3.04.tar.gz[root@localhost xpdf]# cd xpdfbin-linux-3.04[root@localhost xpdfbin-linux-3.04]# cd bin64/[root@localhost bin64]# cp ./* /usr/local/bin/[root@localhost bin64]# cd ../doc/[root@localhost doc]# mkdir -p /usr/local/man/man1[root@localhost doc]# mkdir -p /usr/local/man/man5[root@localhost doc]# cp *.1 /usr/local/man/man1[root@localhost doc]# cp *.5 /usr/local/man/man5[root@localhost xpdf]# cp sample-xpdfrc /usr/local/etc/xpdfrc[root@localhost xpdf]# done
Installation
$ npm install read-pdf
Examples
const ReadPDF = ; var readPDF = '/pdf/slide.pdf' outputName: 'testpdf' extension: 'jpg'; //convert pageNumber to imagereadPDF; // get pdfinforeadPDF //get pdf pageNumbers base on readPDF.pdfInfo()readPDF //Convert pages,default convert all pageslet arr = 0 1 2 3;readPDF;