Skip to content

Basic PDF parser capable of analyzing the cross-reference section of PDF documents

License

Notifications You must be signed in to change notification settings

DraganP1996/pdf-xref-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PDF Cross-reference parser

It is a basic PDF parser capable of analyzing the cross-reference section of PDF documents.

NOTE: This library is currently under development and can be used only for PDF files with cross-reference sections in table format, avoid to use for PDF files with stream or hybrid cross reference sections.

Installation

npm i pdf-xref-parser

Usage

The library exposes the PDFParser class, it is necessary to create an instance of the PDFParser class and call the getXRefEntries method in order to retrieve a list of cross-reference entries from the input document.

Example

const parser = PDFParser(bufferOfData);

const xRefEntries: XRefEntry[] = parser.getXRefEntries();

XRefEntry interface

export interface XRefEntry { type: XREF_ENTRY_TYPES; num: number; generator: number; byteOffset: number; }

About

Basic PDF parser capable of analyzing the cross-reference section of PDF documents

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published