Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/j911/pdf-format-parser
- Owner: J911
- License: mit
- Created: 2018-04-13T05:38:48.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-04-13T14:01:00.000Z (almost 7 years ago)
- Last Synced: 2024-04-24T18:23:54.016Z (9 months ago)
- Language: JavaScript
- Homepage:
- Size: 26.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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