@crit-tech/pdf2text
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -1,2 +0,1 @@ | ||
"use strict"; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
@@ -11,11 +10,6 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.pdf2Text = void 0; | ||
const pdf2json_1 = __importDefault(require("pdf2json")); | ||
const pdf2Text = (localPdf) => __awaiter(void 0, void 0, void 0, function* () { | ||
import PDFParser from "pdf2json"; | ||
export const pdf2Text = (localPdf) => __awaiter(void 0, void 0, void 0, function* () { | ||
const pdfData = yield new Promise((resolve, reject) => { | ||
const pdfParser = new pdf2json_1.default(); | ||
const pdfParser = new PDFParser(); | ||
pdfParser.on("pdfParser_dataError", (errData) => { | ||
@@ -31,4 +25,3 @@ reject(errData); | ||
}); | ||
exports.pdf2Text = pdf2Text; | ||
exports.default = exports.pdf2Text; | ||
export default pdf2Text; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@crit-tech/pdf2text", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Extracts raw text from PDF (no OCR)", | ||
"main": "dist/index.js", | ||
"type": "module", | ||
"private": false, | ||
@@ -7,0 +8,0 @@ "scripts": { |
{ | ||
"compilerOptions": { | ||
"target": "es2016", | ||
"module": "commonjs", | ||
"target": "ES2016", | ||
"module": "NodeNext", | ||
"declaration": true, | ||
@@ -6,0 +6,0 @@ "declarationMap": true, |
Sorry, the diff of this file is not supported yet
Yes
15082
89