Skip to content

J911/pdf-format-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Modules for classifying pdf for format

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published