oadf-pdf-converter
v0.1.0
Published
A small utility tool to convert PDF files into a data structure which is used by OADF parsers
Downloads
6
Readme
OADF PDF Converter
A utility tools that converts PDF files into a format which is consumed by different OADF importers.
Usage
import converter from 'oadf-pdf-converter';
import fs from 'fs';
const filePath = '...';
const data = new Uint8Array(fs.readFileSync(filePath));
const pages = converter(data);
Output format
The converter returns an array of pages which each contain an array of rows with each text fragment wrapped in a element object. All elements are ordered from top left to bottom right.
[
[
[ Element, Element, ... ],
[ ...another row ... ]
],
[ ... another page ... ],
[ ... another page ... ]
]
License
MIT