1.0.2 • Published 8 years ago

unisearch v1.0.2

Weekly downloads
57
License
MIT
Repository
github
Last release
8 years ago

search

Search PDF, DOC and DOCX files

Install

sudo npm install -g unisearch

Bins

Search comes with some bins.

pdfCat

pdfCat converts pdf to txt and sends it to output.

pdfCat pdf.pdf

Libs

pdfSearch

You can use pdfSearch to read PDF files page by page or whole document.

Example

var pdfSearch = require('unisearch').pdfSearch;

pdfSearch.open(process.argv[process.argv.length - 1]).then(function(pdf){
	pdfSearch.readAllPages().then(function(pages){
		console.log(pages.join('\n'));
	});
});

API

Promise pdfSearch.open(fileName)

pdfSearch.open will open PDF file and you can use that same object to read that PDF.

It will return Promise which will resolve when pdfSearch is ready to read pages.

Promise pdfSearch.readAllPages()

pdfSearch.readAllPages will return Promise for Array of strings with text from pages.

Promise pdfSearch.readPage(pageNum)

pdfSearch.readPage will return promise for string which is content of that page

Credits

pdf.js by Mozilla

Author

Nemanja Nedeljković

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago