docen
v0.0.7
Published
Programmatically and command-line implementation of document formatting, powered by Demo Macro.
Downloads
43
Readme
docen
Programmatically and command-line implementation of document formatting, powered by Demo Macro.
Features
- Work in both the browser and Node.js
Getting started
# npm
$ npm install docen
# yarn
$ yarn add docen
# pnpm
$ pnpm add docen
Usage
import { extractText } from "docen";
import { readFileSync, writeFileSync } from "fs";
const source = readFileSync("demo.pdf");
const arrayBuffer = source.buffer.slice(source.byteOffset);
const text = await extractText(arrayBuffer);
writeFileSync("demo.txt", text);
CLI
Usage: docen [command] [options]
Options:
-s, --source Source file
-t, --target Target file
-v, --version Show version number
-h, --help Show help