unpdf 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -4
- package/dist/{shared/unpdf.6c0ca5b5.cjs → index.cjs} +16 -3
- package/dist/{shared/unpdf.3991886a.d.cts → index.d.cts} +10 -6
- package/dist/{shared/unpdf.3991886a.d.mts → index.d.mts} +10 -6
- package/dist/{shared/unpdf.3991886a.d.ts → index.d.ts} +10 -6
- package/dist/{shared/unpdf.ce219a40.mjs → index.mjs} +17 -4
- package/package.json +7 -23
- package/dist/index.node.cjs +0 -24
- package/dist/index.node.d.cts +0 -10
- package/dist/index.node.d.mts +0 -10
- package/dist/index.node.d.ts +0 -10
- package/dist/index.node.mjs +0 -17
- package/dist/index.web.cjs +0 -24
- package/dist/index.web.d.cts +0 -10
- package/dist/index.web.d.mts +0 -10
- package/dist/index.web.d.ts +0 -10
- package/dist/index.web.mjs +0 -17
- package/dist/index.worker.cjs +0 -24
- package/dist/index.worker.d.cts +0 -10
- package/dist/index.worker.d.mts +0 -10
- package/dist/index.worker.d.ts +0 -10
- package/dist/index.worker.mjs +0 -17
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
A collection of utilities to work with PDFs. Designed specifically for Deno, workers and other nodeless environments.
|
|
4
4
|
|
|
5
|
-
`unpdf` ships with a redistribution of Mozilla's [PDF.js](https://github.com/mozilla/pdf.js) for serverless environments. Apart from some string replacements and mocks, [`unenv`](https://github.com/unjs/unenv) does the heavy lifting by converting Node.js specific code to be platform-agnostic.
|
|
5
|
+
`unpdf` ships with a serverless build/redistribution of Mozilla's [PDF.js](https://github.com/mozilla/pdf.js) for serverless environments. Apart from some string replacements and mocks, [`unenv`](https://github.com/unjs/unenv) does the heavy lifting by converting Node.js specific code to be platform-agnostic. See [`pdfjs.rollup.config.ts`](./pdfjs.rollup.config.ts) for all the details.
|
|
6
6
|
|
|
7
7
|
This library is also intended as a modern alternative to the unmaintained but still popular [`pdf-parse`](https://www.npmjs.com/package/pdf-parse).
|
|
8
8
|
|
|
@@ -52,7 +52,7 @@ const { totalPages, text } = await extractPDFText(new Uint8Array(pdf), {
|
|
|
52
52
|
|
|
53
53
|
### Use Legacy Or Custom PDF.js Build
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
Generally, you don't need to worry about the PDF.js build. `unpdf` ships with a serverless build of the latest PDF.js version. However, if you want to use an older version or the legacy build, you can define a custom PDF.js module.
|
|
56
56
|
|
|
57
57
|
```ts
|
|
58
58
|
// Before using any other methods, define the PDF.js module
|
|
@@ -107,9 +107,10 @@ interface UnPDFConfiguration {
|
|
|
107
107
|
* the PDF.js module.
|
|
108
108
|
*
|
|
109
109
|
* @example
|
|
110
|
+
* // Use the legacy build
|
|
110
111
|
* () => import('pdfjs-dist/legacy/build/pdf.js')
|
|
111
112
|
*/
|
|
112
|
-
pdfjs?: () => Promise<
|
|
113
|
+
pdfjs?: () => Promise<PDFJS>;
|
|
113
114
|
}
|
|
114
115
|
```
|
|
115
116
|
|
|
@@ -128,7 +129,7 @@ function defineUnPDFConfig(config: UnPDFConfiguration): Promise<void>;
|
|
|
128
129
|
Returns the resolved PDF.js module. If no build is defined, the latest version will be initialized.
|
|
129
130
|
|
|
130
131
|
```ts
|
|
131
|
-
function getResolvedPDFJS(): Promise<
|
|
132
|
+
function getResolvedPDFJS(): Promise<PDFJS>;
|
|
132
133
|
```
|
|
133
134
|
|
|
134
135
|
### `getPDFMeta`
|
|
@@ -49,7 +49,7 @@ function isPDFDocumentProxy(data) {
|
|
|
49
49
|
return typeof data === "object" && data !== null && "_pdfInfo" in data;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
async function getPDFMeta(data) {
|
|
52
|
+
async function getPDFMeta$1(data) {
|
|
53
53
|
const pdf = isPDFDocumentProxy(data) ? data : await getDocumentProxy(data);
|
|
54
54
|
const meta = await pdf.getMetadata();
|
|
55
55
|
return {
|
|
@@ -58,7 +58,7 @@ async function getPDFMeta(data) {
|
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
async function extractPDFText(data, options = {}) {
|
|
61
|
+
async function extractPDFText$1(data, options = {}) {
|
|
62
62
|
const { mergePages = false } = { ...options };
|
|
63
63
|
const pdf = isPDFDocumentProxy(data) ? data : await getDocumentProxy(data);
|
|
64
64
|
const texts = await Promise.all(
|
|
@@ -80,7 +80,7 @@ async function getPageText(pdf, pageNumber) {
|
|
|
80
80
|
return items.map(({ str }) => str).join("\n");
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
async function getImagesFromPage(data, pageNumber) {
|
|
83
|
+
async function getImagesFromPage$1(data, pageNumber) {
|
|
84
84
|
const pdf = isPDFDocumentProxy(data) ? data : await getDocumentProxy(data);
|
|
85
85
|
const page = await pdf.getPage(pageNumber);
|
|
86
86
|
const operatorList = await page.getOperatorList();
|
|
@@ -98,6 +98,19 @@ async function getImagesFromPage(data, pageNumber) {
|
|
|
98
98
|
return images;
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
+
const getPDFMeta = async (...args) => {
|
|
102
|
+
await resolvePDFJSImports();
|
|
103
|
+
return await getPDFMeta$1(...args);
|
|
104
|
+
};
|
|
105
|
+
const extractPDFText = async (...args) => {
|
|
106
|
+
await resolvePDFJSImports();
|
|
107
|
+
return await extractPDFText$1(...args);
|
|
108
|
+
};
|
|
109
|
+
const getImagesFromPage = async (...args) => {
|
|
110
|
+
await resolvePDFJSImports();
|
|
111
|
+
return await getImagesFromPage$1(...args);
|
|
112
|
+
};
|
|
113
|
+
|
|
101
114
|
exports.defineUnPDFConfig = defineUnPDFConfig;
|
|
102
115
|
exports.extractPDFText = extractPDFText;
|
|
103
116
|
exports.getDocumentProxy = getDocumentProxy;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { BinaryData, PDFDocumentProxy, DocumentInitParameters } from '
|
|
2
|
-
import _PDFJS from '
|
|
1
|
+
import { BinaryData, PDFDocumentProxy, DocumentInitParameters } from './types/src/display/api';
|
|
2
|
+
import * as _PDFJS from './types/src/pdf';
|
|
3
3
|
|
|
4
|
-
declare function getPDFMeta(data: BinaryData | PDFDocumentProxy): Promise<{
|
|
4
|
+
declare function getPDFMeta$1(data: BinaryData | PDFDocumentProxy): Promise<{
|
|
5
5
|
info: Record<string, any>;
|
|
6
6
|
metadata: Record<string, any>;
|
|
7
7
|
}>;
|
|
8
8
|
|
|
9
|
-
declare function extractPDFText(data: BinaryData | PDFDocumentProxy, options?: {
|
|
9
|
+
declare function extractPDFText$1(data: BinaryData | PDFDocumentProxy, options?: {
|
|
10
10
|
mergePages?: boolean;
|
|
11
11
|
}): Promise<{
|
|
12
12
|
totalPages: number;
|
|
13
13
|
text: string | string[];
|
|
14
14
|
}>;
|
|
15
15
|
|
|
16
|
-
declare function getImagesFromPage(data: BinaryData | PDFDocumentProxy, pageNumber: number): Promise<ArrayBuffer[]>;
|
|
16
|
+
declare function getImagesFromPage$1(data: BinaryData | PDFDocumentProxy, pageNumber: number): Promise<ArrayBuffer[]>;
|
|
17
17
|
|
|
18
18
|
type PDFJS = typeof _PDFJS;
|
|
19
19
|
interface UnPDFConfiguration {
|
|
@@ -42,4 +42,8 @@ declare function resolvePDFJSImports(pdfjsResolver?: () => Promise<PDFJS>, { for
|
|
|
42
42
|
force?: boolean | undefined;
|
|
43
43
|
}): Promise<void>;
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
declare const getPDFMeta: typeof getPDFMeta$1;
|
|
46
|
+
declare const extractPDFText: typeof extractPDFText$1;
|
|
47
|
+
declare const getImagesFromPage: typeof getImagesFromPage$1;
|
|
48
|
+
|
|
49
|
+
export { defineUnPDFConfig, extractPDFText, getDocumentProxy, getImagesFromPage, getPDFMeta, getResolvedPDFJS, resolvePDFJSImports };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { BinaryData, PDFDocumentProxy, DocumentInitParameters } from '
|
|
2
|
-
import _PDFJS from '
|
|
1
|
+
import { BinaryData, PDFDocumentProxy, DocumentInitParameters } from './types/src/display/api';
|
|
2
|
+
import * as _PDFJS from './types/src/pdf';
|
|
3
3
|
|
|
4
|
-
declare function getPDFMeta(data: BinaryData | PDFDocumentProxy): Promise<{
|
|
4
|
+
declare function getPDFMeta$1(data: BinaryData | PDFDocumentProxy): Promise<{
|
|
5
5
|
info: Record<string, any>;
|
|
6
6
|
metadata: Record<string, any>;
|
|
7
7
|
}>;
|
|
8
8
|
|
|
9
|
-
declare function extractPDFText(data: BinaryData | PDFDocumentProxy, options?: {
|
|
9
|
+
declare function extractPDFText$1(data: BinaryData | PDFDocumentProxy, options?: {
|
|
10
10
|
mergePages?: boolean;
|
|
11
11
|
}): Promise<{
|
|
12
12
|
totalPages: number;
|
|
13
13
|
text: string | string[];
|
|
14
14
|
}>;
|
|
15
15
|
|
|
16
|
-
declare function getImagesFromPage(data: BinaryData | PDFDocumentProxy, pageNumber: number): Promise<ArrayBuffer[]>;
|
|
16
|
+
declare function getImagesFromPage$1(data: BinaryData | PDFDocumentProxy, pageNumber: number): Promise<ArrayBuffer[]>;
|
|
17
17
|
|
|
18
18
|
type PDFJS = typeof _PDFJS;
|
|
19
19
|
interface UnPDFConfiguration {
|
|
@@ -42,4 +42,8 @@ declare function resolvePDFJSImports(pdfjsResolver?: () => Promise<PDFJS>, { for
|
|
|
42
42
|
force?: boolean | undefined;
|
|
43
43
|
}): Promise<void>;
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
declare const getPDFMeta: typeof getPDFMeta$1;
|
|
46
|
+
declare const extractPDFText: typeof extractPDFText$1;
|
|
47
|
+
declare const getImagesFromPage: typeof getImagesFromPage$1;
|
|
48
|
+
|
|
49
|
+
export { defineUnPDFConfig, extractPDFText, getDocumentProxy, getImagesFromPage, getPDFMeta, getResolvedPDFJS, resolvePDFJSImports };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { BinaryData, PDFDocumentProxy, DocumentInitParameters } from '
|
|
2
|
-
import _PDFJS from '
|
|
1
|
+
import { BinaryData, PDFDocumentProxy, DocumentInitParameters } from './types/src/display/api';
|
|
2
|
+
import * as _PDFJS from './types/src/pdf';
|
|
3
3
|
|
|
4
|
-
declare function getPDFMeta(data: BinaryData | PDFDocumentProxy): Promise<{
|
|
4
|
+
declare function getPDFMeta$1(data: BinaryData | PDFDocumentProxy): Promise<{
|
|
5
5
|
info: Record<string, any>;
|
|
6
6
|
metadata: Record<string, any>;
|
|
7
7
|
}>;
|
|
8
8
|
|
|
9
|
-
declare function extractPDFText(data: BinaryData | PDFDocumentProxy, options?: {
|
|
9
|
+
declare function extractPDFText$1(data: BinaryData | PDFDocumentProxy, options?: {
|
|
10
10
|
mergePages?: boolean;
|
|
11
11
|
}): Promise<{
|
|
12
12
|
totalPages: number;
|
|
13
13
|
text: string | string[];
|
|
14
14
|
}>;
|
|
15
15
|
|
|
16
|
-
declare function getImagesFromPage(data: BinaryData | PDFDocumentProxy, pageNumber: number): Promise<ArrayBuffer[]>;
|
|
16
|
+
declare function getImagesFromPage$1(data: BinaryData | PDFDocumentProxy, pageNumber: number): Promise<ArrayBuffer[]>;
|
|
17
17
|
|
|
18
18
|
type PDFJS = typeof _PDFJS;
|
|
19
19
|
interface UnPDFConfiguration {
|
|
@@ -42,4 +42,8 @@ declare function resolvePDFJSImports(pdfjsResolver?: () => Promise<PDFJS>, { for
|
|
|
42
42
|
force?: boolean | undefined;
|
|
43
43
|
}): Promise<void>;
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
declare const getPDFMeta: typeof getPDFMeta$1;
|
|
46
|
+
declare const extractPDFText: typeof extractPDFText$1;
|
|
47
|
+
declare const getImagesFromPage: typeof getImagesFromPage$1;
|
|
48
|
+
|
|
49
|
+
export { defineUnPDFConfig, extractPDFText, getDocumentProxy, getImagesFromPage, getPDFMeta, getResolvedPDFJS, resolvePDFJSImports };
|
|
@@ -47,7 +47,7 @@ function isPDFDocumentProxy(data) {
|
|
|
47
47
|
return typeof data === "object" && data !== null && "_pdfInfo" in data;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
async function getPDFMeta(data) {
|
|
50
|
+
async function getPDFMeta$1(data) {
|
|
51
51
|
const pdf = isPDFDocumentProxy(data) ? data : await getDocumentProxy(data);
|
|
52
52
|
const meta = await pdf.getMetadata();
|
|
53
53
|
return {
|
|
@@ -56,7 +56,7 @@ async function getPDFMeta(data) {
|
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
async function extractPDFText(data, options = {}) {
|
|
59
|
+
async function extractPDFText$1(data, options = {}) {
|
|
60
60
|
const { mergePages = false } = { ...options };
|
|
61
61
|
const pdf = isPDFDocumentProxy(data) ? data : await getDocumentProxy(data);
|
|
62
62
|
const texts = await Promise.all(
|
|
@@ -78,7 +78,7 @@ async function getPageText(pdf, pageNumber) {
|
|
|
78
78
|
return items.map(({ str }) => str).join("\n");
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
async function getImagesFromPage(data, pageNumber) {
|
|
81
|
+
async function getImagesFromPage$1(data, pageNumber) {
|
|
82
82
|
const pdf = isPDFDocumentProxy(data) ? data : await getDocumentProxy(data);
|
|
83
83
|
const page = await pdf.getPage(pageNumber);
|
|
84
84
|
const operatorList = await page.getOperatorList();
|
|
@@ -96,4 +96,17 @@ async function getImagesFromPage(data, pageNumber) {
|
|
|
96
96
|
return images;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
|
|
99
|
+
const getPDFMeta = async (...args) => {
|
|
100
|
+
await resolvePDFJSImports();
|
|
101
|
+
return await getPDFMeta$1(...args);
|
|
102
|
+
};
|
|
103
|
+
const extractPDFText = async (...args) => {
|
|
104
|
+
await resolvePDFJSImports();
|
|
105
|
+
return await extractPDFText$1(...args);
|
|
106
|
+
};
|
|
107
|
+
const getImagesFromPage = async (...args) => {
|
|
108
|
+
await resolvePDFJSImports();
|
|
109
|
+
return await getImagesFromPage$1(...args);
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
export { defineUnPDFConfig, extractPDFText, getDocumentProxy, getImagesFromPage, getPDFMeta, getResolvedPDFJS, resolvePDFJSImports };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unpdf",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.1",
|
|
5
5
|
"packageManager": "pnpm@8.7.0",
|
|
6
6
|
"description": "Utilities to work with PDFs in Node.js, browser and workers",
|
|
7
7
|
"author": "Johann Schopplich <pkg@johannschopplich.com>",
|
|
@@ -22,34 +22,18 @@
|
|
|
22
22
|
"sideEffects": false,
|
|
23
23
|
"exports": {
|
|
24
24
|
".": {
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"edge-light": "./dist/index.worker.mjs",
|
|
29
|
-
"edge-routine": "./dist/index.worker.mjs",
|
|
30
|
-
"lagon": "./dist/index.worker.mjs",
|
|
31
|
-
"netlify": "./dist/index.worker.mjs",
|
|
32
|
-
"react-native": "./dist/index.worker.mjs",
|
|
33
|
-
"wintercg": "./dist/index.worker.mjs",
|
|
34
|
-
"worker": "./dist/index.worker.mjs",
|
|
35
|
-
"workerd": "./dist/index.worker.mjs",
|
|
36
|
-
"node": {
|
|
37
|
-
"types": "./dist/index.node.d.ts",
|
|
38
|
-
"import": "./dist/index.node.mjs",
|
|
39
|
-
"require": "./dist/index.node.cjs"
|
|
40
|
-
},
|
|
41
|
-
"types": "./dist/index.web.d.ts",
|
|
42
|
-
"import": "./dist/index.web.mjs",
|
|
43
|
-
"require": "./dist/index.web.cjs"
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
|
+
"import": "./dist/index.mjs",
|
|
27
|
+
"require": "./dist/index.cjs"
|
|
44
28
|
},
|
|
45
29
|
"./pdfjs": {
|
|
46
30
|
"types": "./dist/pdfjs.d.ts",
|
|
47
31
|
"import": "./dist/pdfjs.mjs"
|
|
48
32
|
}
|
|
49
33
|
},
|
|
50
|
-
"main": "./dist/index.
|
|
51
|
-
"module": "./dist/index.
|
|
52
|
-
"types": "./dist/index.
|
|
34
|
+
"main": "./dist/index.cjs",
|
|
35
|
+
"module": "./dist/index.mjs",
|
|
36
|
+
"types": "./dist/index.d.ts",
|
|
53
37
|
"typesVersions": {
|
|
54
38
|
"*": {
|
|
55
39
|
"*": [
|
package/dist/index.node.cjs
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const image = require('./shared/unpdf.6c0ca5b5.cjs');
|
|
4
|
-
|
|
5
|
-
const getPDFMeta = async (...args) => {
|
|
6
|
-
await image.resolvePDFJSImports();
|
|
7
|
-
return await image.getPDFMeta(...args);
|
|
8
|
-
};
|
|
9
|
-
const extractPDFText = async (...args) => {
|
|
10
|
-
await image.resolvePDFJSImports();
|
|
11
|
-
return await image.extractPDFText(...args);
|
|
12
|
-
};
|
|
13
|
-
const getImagesFromPage = async (...args) => {
|
|
14
|
-
await image.resolvePDFJSImports();
|
|
15
|
-
return await image.getImagesFromPage(...args);
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
exports.defineUnPDFConfig = image.defineUnPDFConfig;
|
|
19
|
-
exports.getDocumentProxy = image.getDocumentProxy;
|
|
20
|
-
exports.getResolvedPDFJS = image.getResolvedPDFJS;
|
|
21
|
-
exports.resolvePDFJSImports = image.resolvePDFJSImports;
|
|
22
|
-
exports.extractPDFText = extractPDFText;
|
|
23
|
-
exports.getImagesFromPage = getImagesFromPage;
|
|
24
|
-
exports.getPDFMeta = getPDFMeta;
|
package/dist/index.node.d.cts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { g as getPDFMeta$1, e as extractPDFText$1, a as getImagesFromPage$1 } from './shared/unpdf.3991886a.cjs';
|
|
2
|
-
export { d as defineUnPDFConfig, b as getDocumentProxy, c as getResolvedPDFJS, r as resolvePDFJSImports } from './shared/unpdf.3991886a.cjs';
|
|
3
|
-
import 'types/src/display/api';
|
|
4
|
-
import 'types/src/pdf';
|
|
5
|
-
|
|
6
|
-
declare const getPDFMeta: typeof getPDFMeta$1;
|
|
7
|
-
declare const extractPDFText: typeof extractPDFText$1;
|
|
8
|
-
declare const getImagesFromPage: typeof getImagesFromPage$1;
|
|
9
|
-
|
|
10
|
-
export { extractPDFText, getImagesFromPage, getPDFMeta };
|
package/dist/index.node.d.mts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { g as getPDFMeta$1, e as extractPDFText$1, a as getImagesFromPage$1 } from './shared/unpdf.3991886a.mjs';
|
|
2
|
-
export { d as defineUnPDFConfig, b as getDocumentProxy, c as getResolvedPDFJS, r as resolvePDFJSImports } from './shared/unpdf.3991886a.mjs';
|
|
3
|
-
import 'types/src/display/api';
|
|
4
|
-
import 'types/src/pdf';
|
|
5
|
-
|
|
6
|
-
declare const getPDFMeta: typeof getPDFMeta$1;
|
|
7
|
-
declare const extractPDFText: typeof extractPDFText$1;
|
|
8
|
-
declare const getImagesFromPage: typeof getImagesFromPage$1;
|
|
9
|
-
|
|
10
|
-
export { extractPDFText, getImagesFromPage, getPDFMeta };
|
package/dist/index.node.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { g as getPDFMeta$1, e as extractPDFText$1, a as getImagesFromPage$1 } from './shared/unpdf.3991886a.js';
|
|
2
|
-
export { d as defineUnPDFConfig, b as getDocumentProxy, c as getResolvedPDFJS, r as resolvePDFJSImports } from './shared/unpdf.3991886a.js';
|
|
3
|
-
import 'types/src/display/api';
|
|
4
|
-
import 'types/src/pdf';
|
|
5
|
-
|
|
6
|
-
declare const getPDFMeta: typeof getPDFMeta$1;
|
|
7
|
-
declare const extractPDFText: typeof extractPDFText$1;
|
|
8
|
-
declare const getImagesFromPage: typeof getImagesFromPage$1;
|
|
9
|
-
|
|
10
|
-
export { extractPDFText, getImagesFromPage, getPDFMeta };
|
package/dist/index.node.mjs
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { r as resolvePDFJSImports, g as getPDFMeta$1, e as extractPDFText$1, a as getImagesFromPage$1 } from './shared/unpdf.ce219a40.mjs';
|
|
2
|
-
export { d as defineUnPDFConfig, b as getDocumentProxy, c as getResolvedPDFJS } from './shared/unpdf.ce219a40.mjs';
|
|
3
|
-
|
|
4
|
-
const getPDFMeta = async (...args) => {
|
|
5
|
-
await resolvePDFJSImports();
|
|
6
|
-
return await getPDFMeta$1(...args);
|
|
7
|
-
};
|
|
8
|
-
const extractPDFText = async (...args) => {
|
|
9
|
-
await resolvePDFJSImports();
|
|
10
|
-
return await extractPDFText$1(...args);
|
|
11
|
-
};
|
|
12
|
-
const getImagesFromPage = async (...args) => {
|
|
13
|
-
await resolvePDFJSImports();
|
|
14
|
-
return await getImagesFromPage$1(...args);
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export { extractPDFText, getImagesFromPage, getPDFMeta, resolvePDFJSImports };
|
package/dist/index.web.cjs
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const image = require('./shared/unpdf.6c0ca5b5.cjs');
|
|
4
|
-
|
|
5
|
-
const getPDFMeta = async (...args) => {
|
|
6
|
-
await image.resolvePDFJSImports();
|
|
7
|
-
return await image.getPDFMeta(...args);
|
|
8
|
-
};
|
|
9
|
-
const extractPDFText = async (...args) => {
|
|
10
|
-
await image.resolvePDFJSImports();
|
|
11
|
-
return await image.extractPDFText(...args);
|
|
12
|
-
};
|
|
13
|
-
const getImagesFromPage = async (...args) => {
|
|
14
|
-
await image.resolvePDFJSImports();
|
|
15
|
-
return await image.getImagesFromPage(...args);
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
exports.defineUnPDFConfig = image.defineUnPDFConfig;
|
|
19
|
-
exports.getDocumentProxy = image.getDocumentProxy;
|
|
20
|
-
exports.getResolvedPDFJS = image.getResolvedPDFJS;
|
|
21
|
-
exports.resolvePDFJSImports = image.resolvePDFJSImports;
|
|
22
|
-
exports.extractPDFText = extractPDFText;
|
|
23
|
-
exports.getImagesFromPage = getImagesFromPage;
|
|
24
|
-
exports.getPDFMeta = getPDFMeta;
|
package/dist/index.web.d.cts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { g as getPDFMeta$1, e as extractPDFText$1, a as getImagesFromPage$1 } from './shared/unpdf.3991886a.cjs';
|
|
2
|
-
export { d as defineUnPDFConfig, b as getDocumentProxy, c as getResolvedPDFJS, r as resolvePDFJSImports } from './shared/unpdf.3991886a.cjs';
|
|
3
|
-
import 'types/src/display/api';
|
|
4
|
-
import 'types/src/pdf';
|
|
5
|
-
|
|
6
|
-
declare const getPDFMeta: typeof getPDFMeta$1;
|
|
7
|
-
declare const extractPDFText: typeof extractPDFText$1;
|
|
8
|
-
declare const getImagesFromPage: typeof getImagesFromPage$1;
|
|
9
|
-
|
|
10
|
-
export { extractPDFText, getImagesFromPage, getPDFMeta };
|
package/dist/index.web.d.mts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { g as getPDFMeta$1, e as extractPDFText$1, a as getImagesFromPage$1 } from './shared/unpdf.3991886a.mjs';
|
|
2
|
-
export { d as defineUnPDFConfig, b as getDocumentProxy, c as getResolvedPDFJS, r as resolvePDFJSImports } from './shared/unpdf.3991886a.mjs';
|
|
3
|
-
import 'types/src/display/api';
|
|
4
|
-
import 'types/src/pdf';
|
|
5
|
-
|
|
6
|
-
declare const getPDFMeta: typeof getPDFMeta$1;
|
|
7
|
-
declare const extractPDFText: typeof extractPDFText$1;
|
|
8
|
-
declare const getImagesFromPage: typeof getImagesFromPage$1;
|
|
9
|
-
|
|
10
|
-
export { extractPDFText, getImagesFromPage, getPDFMeta };
|
package/dist/index.web.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { g as getPDFMeta$1, e as extractPDFText$1, a as getImagesFromPage$1 } from './shared/unpdf.3991886a.js';
|
|
2
|
-
export { d as defineUnPDFConfig, b as getDocumentProxy, c as getResolvedPDFJS, r as resolvePDFJSImports } from './shared/unpdf.3991886a.js';
|
|
3
|
-
import 'types/src/display/api';
|
|
4
|
-
import 'types/src/pdf';
|
|
5
|
-
|
|
6
|
-
declare const getPDFMeta: typeof getPDFMeta$1;
|
|
7
|
-
declare const extractPDFText: typeof extractPDFText$1;
|
|
8
|
-
declare const getImagesFromPage: typeof getImagesFromPage$1;
|
|
9
|
-
|
|
10
|
-
export { extractPDFText, getImagesFromPage, getPDFMeta };
|
package/dist/index.web.mjs
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { r as resolvePDFJSImports, g as getPDFMeta$1, e as extractPDFText$1, a as getImagesFromPage$1 } from './shared/unpdf.ce219a40.mjs';
|
|
2
|
-
export { d as defineUnPDFConfig, b as getDocumentProxy, c as getResolvedPDFJS } from './shared/unpdf.ce219a40.mjs';
|
|
3
|
-
|
|
4
|
-
const getPDFMeta = async (...args) => {
|
|
5
|
-
await resolvePDFJSImports();
|
|
6
|
-
return await getPDFMeta$1(...args);
|
|
7
|
-
};
|
|
8
|
-
const extractPDFText = async (...args) => {
|
|
9
|
-
await resolvePDFJSImports();
|
|
10
|
-
return await extractPDFText$1(...args);
|
|
11
|
-
};
|
|
12
|
-
const getImagesFromPage = async (...args) => {
|
|
13
|
-
await resolvePDFJSImports();
|
|
14
|
-
return await getImagesFromPage$1(...args);
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export { extractPDFText, getImagesFromPage, getPDFMeta, resolvePDFJSImports };
|
package/dist/index.worker.cjs
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const image = require('./shared/unpdf.6c0ca5b5.cjs');
|
|
4
|
-
|
|
5
|
-
const getPDFMeta = async (...args) => {
|
|
6
|
-
await image.resolvePDFJSImports();
|
|
7
|
-
return await image.getPDFMeta(...args);
|
|
8
|
-
};
|
|
9
|
-
const extractPDFText = async (...args) => {
|
|
10
|
-
await image.resolvePDFJSImports();
|
|
11
|
-
return await image.extractPDFText(...args);
|
|
12
|
-
};
|
|
13
|
-
const getImagesFromPage = async (...args) => {
|
|
14
|
-
await image.resolvePDFJSImports();
|
|
15
|
-
return await image.getImagesFromPage(...args);
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
exports.defineUnPDFConfig = image.defineUnPDFConfig;
|
|
19
|
-
exports.getDocumentProxy = image.getDocumentProxy;
|
|
20
|
-
exports.getResolvedPDFJS = image.getResolvedPDFJS;
|
|
21
|
-
exports.resolvePDFJSImports = image.resolvePDFJSImports;
|
|
22
|
-
exports.extractPDFText = extractPDFText;
|
|
23
|
-
exports.getImagesFromPage = getImagesFromPage;
|
|
24
|
-
exports.getPDFMeta = getPDFMeta;
|
package/dist/index.worker.d.cts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { g as getPDFMeta$1, e as extractPDFText$1, a as getImagesFromPage$1 } from './shared/unpdf.3991886a.cjs';
|
|
2
|
-
export { d as defineUnPDFConfig, b as getDocumentProxy, c as getResolvedPDFJS, r as resolvePDFJSImports } from './shared/unpdf.3991886a.cjs';
|
|
3
|
-
import 'types/src/display/api';
|
|
4
|
-
import 'types/src/pdf';
|
|
5
|
-
|
|
6
|
-
declare const getPDFMeta: typeof getPDFMeta$1;
|
|
7
|
-
declare const extractPDFText: typeof extractPDFText$1;
|
|
8
|
-
declare const getImagesFromPage: typeof getImagesFromPage$1;
|
|
9
|
-
|
|
10
|
-
export { extractPDFText, getImagesFromPage, getPDFMeta };
|
package/dist/index.worker.d.mts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { g as getPDFMeta$1, e as extractPDFText$1, a as getImagesFromPage$1 } from './shared/unpdf.3991886a.mjs';
|
|
2
|
-
export { d as defineUnPDFConfig, b as getDocumentProxy, c as getResolvedPDFJS, r as resolvePDFJSImports } from './shared/unpdf.3991886a.mjs';
|
|
3
|
-
import 'types/src/display/api';
|
|
4
|
-
import 'types/src/pdf';
|
|
5
|
-
|
|
6
|
-
declare const getPDFMeta: typeof getPDFMeta$1;
|
|
7
|
-
declare const extractPDFText: typeof extractPDFText$1;
|
|
8
|
-
declare const getImagesFromPage: typeof getImagesFromPage$1;
|
|
9
|
-
|
|
10
|
-
export { extractPDFText, getImagesFromPage, getPDFMeta };
|
package/dist/index.worker.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { g as getPDFMeta$1, e as extractPDFText$1, a as getImagesFromPage$1 } from './shared/unpdf.3991886a.js';
|
|
2
|
-
export { d as defineUnPDFConfig, b as getDocumentProxy, c as getResolvedPDFJS, r as resolvePDFJSImports } from './shared/unpdf.3991886a.js';
|
|
3
|
-
import 'types/src/display/api';
|
|
4
|
-
import 'types/src/pdf';
|
|
5
|
-
|
|
6
|
-
declare const getPDFMeta: typeof getPDFMeta$1;
|
|
7
|
-
declare const extractPDFText: typeof extractPDFText$1;
|
|
8
|
-
declare const getImagesFromPage: typeof getImagesFromPage$1;
|
|
9
|
-
|
|
10
|
-
export { extractPDFText, getImagesFromPage, getPDFMeta };
|
package/dist/index.worker.mjs
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { r as resolvePDFJSImports, g as getPDFMeta$1, e as extractPDFText$1, a as getImagesFromPage$1 } from './shared/unpdf.ce219a40.mjs';
|
|
2
|
-
export { d as defineUnPDFConfig, b as getDocumentProxy, c as getResolvedPDFJS } from './shared/unpdf.ce219a40.mjs';
|
|
3
|
-
|
|
4
|
-
const getPDFMeta = async (...args) => {
|
|
5
|
-
await resolvePDFJSImports();
|
|
6
|
-
return await getPDFMeta$1(...args);
|
|
7
|
-
};
|
|
8
|
-
const extractPDFText = async (...args) => {
|
|
9
|
-
await resolvePDFJSImports();
|
|
10
|
-
return await extractPDFText$1(...args);
|
|
11
|
-
};
|
|
12
|
-
const getImagesFromPage = async (...args) => {
|
|
13
|
-
await resolvePDFJSImports();
|
|
14
|
-
return await getImagesFromPage$1(...args);
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export { extractPDFText, getImagesFromPage, getPDFMeta, resolvePDFJSImports };
|