Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/j911/pdf-format-parser

Modules for classifying pdf for format
https://github.com/j911/pdf-format-parser

Last synced: about 2 months ago
JSON representation

Modules for classifying pdf for format

Awesome Lists containing this project

README

        

# PDF-FORMAT-PARSER
Modules for classifying pdf for format

## Install
```
npm install --save pdf-format-parser
```
## Use
```
const fs = require('fs');
const pdfFormatParser = require('../');

fs.readFile('./hello.pdf', (err, data) => {
const pf = pdfFormatParser.parse(data);

console.log('Header:', pf.Header)
console.log('File Trailer: ', pf.FileTrailer)
console.log('File Trailer: ', pdfFormatParser.getCrossReferenceTable(data))
});
```

## Method
- parse(data)

return {
Header,
Body,
CrossReferenceTable,
FileTrailer
}

- getHeader(data)

return Header
- getBody(data)

return Body
- getCrossReferenceTable(data)

return CrossReferenceTable
- getFileTrailer(data)

return FileTrailer

## License
MIT