@effortlessmotion/pdf-to-md 0.1.3 → 0.1.4
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/dist/cjs/pdf-open.js
CHANGED
|
@@ -205,12 +205,13 @@ function openDocument(src) {
|
|
|
205
205
|
//
|
|
206
206
|
// GOTCHA: despite the `...Url` name, pdfjs's Node loader does `fs.readFile`
|
|
207
207
|
// on the string directly — a `file://` URL silently fails every lookup (only a stderr warning); plain filesystem paths are required.
|
|
208
|
+
// The trailing "/" must be literal (pdfjs rejects a trailing "\"); Windows' fs accepts "/" after a "\" path.
|
|
208
209
|
var PDFJS_DIST_ROOT = _nodepath.default.dirname((0, _resolvets.resolvePackagePath)('pdfjs-dist/package.json'));
|
|
209
|
-
var CMAP_URL = _nodepath.default.join(PDFJS_DIST_ROOT, 'cmaps')
|
|
210
|
-
var STANDARD_FONT_DATA_URL = _nodepath.default.join(PDFJS_DIST_ROOT, 'standard_fonts')
|
|
210
|
+
var CMAP_URL = "".concat(_nodepath.default.join(PDFJS_DIST_ROOT, 'cmaps'), "/");
|
|
211
|
+
var STANDARD_FONT_DATA_URL = "".concat(_nodepath.default.join(PDFJS_DIST_ROOT, 'standard_fonts'), "/");
|
|
211
212
|
// JBIG2/JPEG2000 decoding lives in pdfjs's WASM modules: without this, bitonal
|
|
212
213
|
// scans (the usual encoding for B&W page images) decode to a BLANK page and OCR sees nothing.
|
|
213
|
-
var WASM_URL = _nodepath.default.join(PDFJS_DIST_ROOT, 'wasm')
|
|
214
|
+
var WASM_URL = "".concat(_nodepath.default.join(PDFJS_DIST_ROOT, 'wasm'), "/");
|
|
214
215
|
function openPdfForRender(pdfPath) {
|
|
215
216
|
// No `worker` option: this pdfjs-dist Node build needs no real Worker thread wired up to run.
|
|
216
217
|
return (0, _pdf.getDocument)({
|
package/dist/cjs/pdf-open.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/formats/pdf-to-md/src/pdf-open.ts"],"sourcesContent":["// pdf-open.ts — the one seam that opens a PDF via pdfjs-dist, in the two\n// shapes callers need: openDocument (data-based, already-open doc) and openPdfForRender (url-based, task you must await + destroy()).\n// Both wrap a failure the same way: PdfToMdError/PDF_OPEN, original message preserved.\nimport { readFileSync } from 'node:fs';\nimport path from 'node:path';\nimport type { PDFDocumentLoadingTask, PDFDocumentProxy } from 'pdfjs-dist/legacy/build/pdf.mjs';\nimport { getDocument, VerbosityLevel } from 'pdfjs-dist/legacy/build/pdf.mjs';\nimport { PdfToMdError } from './errors.ts';\nimport { resolvePackagePath } from './resolve.ts';\n\n// `verbosity: VerbosityLevel.ERRORS` silences pdfjs's own console.warn calls\n// — the library's documented promise is it never writes to stdout/stderr on its own.\n\n/** Data-based open (collect.ts's seam): no cMaps/fonts — text-layer extraction\n * only, verified to decode CJK correctly. Wraps missing/unreadable and non-PDF files as PdfToMdError/PDF_OPEN. */\nexport async function openDocument(src: string): Promise<PDFDocumentProxy> {\n let data: Uint8Array;\n try {\n data = new Uint8Array(readFileSync(src));\n } catch (err) {\n throw new PdfToMdError('PDF_OPEN', `cannot read ${src}: ${(err as Error).message}`);\n }\n try {\n return await getDocument({\n data,\n useSystemFonts: true,\n verbosity: VerbosityLevel.ERRORS,\n }).promise;\n } catch (err) {\n throw new PdfToMdError('PDF_OPEN', `cannot open ${src} as a PDF: ${(err as Error).message}`);\n }\n}\n\n// Wires up pdfjs's bundled cmaps/standard_fonts so CJK and non-embedded\n// standard fonts resolve instead of falling back to substitute glyphs.\n//\n// GOTCHA: despite the `...Url` name, pdfjs's Node loader does `fs.readFile`\n// on the string directly — a `file://` URL silently fails every lookup (only a stderr warning); plain filesystem paths are required.\nconst PDFJS_DIST_ROOT = path.dirname(resolvePackagePath('pdfjs-dist/package.json'));\nconst CMAP_URL = path.join(PDFJS_DIST_ROOT, 'cmaps')
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/formats/pdf-to-md/src/pdf-open.ts"],"sourcesContent":["// pdf-open.ts — the one seam that opens a PDF via pdfjs-dist, in the two\n// shapes callers need: openDocument (data-based, already-open doc) and openPdfForRender (url-based, task you must await + destroy()).\n// Both wrap a failure the same way: PdfToMdError/PDF_OPEN, original message preserved.\nimport { readFileSync } from 'node:fs';\nimport path from 'node:path';\nimport type { PDFDocumentLoadingTask, PDFDocumentProxy } from 'pdfjs-dist/legacy/build/pdf.mjs';\nimport { getDocument, VerbosityLevel } from 'pdfjs-dist/legacy/build/pdf.mjs';\nimport { PdfToMdError } from './errors.ts';\nimport { resolvePackagePath } from './resolve.ts';\n\n// `verbosity: VerbosityLevel.ERRORS` silences pdfjs's own console.warn calls\n// — the library's documented promise is it never writes to stdout/stderr on its own.\n\n/** Data-based open (collect.ts's seam): no cMaps/fonts — text-layer extraction\n * only, verified to decode CJK correctly. Wraps missing/unreadable and non-PDF files as PdfToMdError/PDF_OPEN. */\nexport async function openDocument(src: string): Promise<PDFDocumentProxy> {\n let data: Uint8Array;\n try {\n data = new Uint8Array(readFileSync(src));\n } catch (err) {\n throw new PdfToMdError('PDF_OPEN', `cannot read ${src}: ${(err as Error).message}`);\n }\n try {\n return await getDocument({\n data,\n useSystemFonts: true,\n verbosity: VerbosityLevel.ERRORS,\n }).promise;\n } catch (err) {\n throw new PdfToMdError('PDF_OPEN', `cannot open ${src} as a PDF: ${(err as Error).message}`);\n }\n}\n\n// Wires up pdfjs's bundled cmaps/standard_fonts so CJK and non-embedded\n// standard fonts resolve instead of falling back to substitute glyphs.\n//\n// GOTCHA: despite the `...Url` name, pdfjs's Node loader does `fs.readFile`\n// on the string directly — a `file://` URL silently fails every lookup (only a stderr warning); plain filesystem paths are required.\n// The trailing \"/\" must be literal (pdfjs rejects a trailing \"\\\"); Windows' fs accepts \"/\" after a \"\\\" path.\nconst PDFJS_DIST_ROOT = path.dirname(resolvePackagePath('pdfjs-dist/package.json'));\nconst CMAP_URL = `${path.join(PDFJS_DIST_ROOT, 'cmaps')}/`;\nconst STANDARD_FONT_DATA_URL = `${path.join(PDFJS_DIST_ROOT, 'standard_fonts')}/`;\n// JBIG2/JPEG2000 decoding lives in pdfjs's WASM modules: without this, bitonal\n// scans (the usual encoding for B&W page images) decode to a BLANK page and OCR sees nothing.\nconst WASM_URL = `${path.join(PDFJS_DIST_ROOT, 'wasm')}/`;\n\n/**\n * Open a PDF for rendering (raster.ts/tesseract.ts's seam): cMaps + standard\n * fonts wired up, url-based. Callers must `await` the returned task's `.promise` (via `awaitPdfOpen`) and call `.destroy()` when done.\n */\nexport function openPdfForRender(pdfPath: string): PDFDocumentLoadingTask {\n // No `worker` option: this pdfjs-dist Node build needs no real Worker thread wired up to run.\n return getDocument({\n url: pdfPath,\n cMapUrl: CMAP_URL,\n cMapPacked: true,\n standardFontDataUrl: STANDARD_FONT_DATA_URL,\n wasmUrl: WASM_URL,\n verbosity: VerbosityLevel.ERRORS,\n });\n}\n\n/** Shared error wrapping for `openPdfForRender`'s task: a raw pdfjs open\n * failure becomes PdfToMdError/PDF_OPEN, original message preserved. */\nexport async function awaitPdfOpen(loadingTask: PDFDocumentLoadingTask, pdfPath: string): Promise<PDFDocumentProxy> {\n try {\n return await loadingTask.promise;\n } catch (err) {\n throw new PdfToMdError('PDF_OPEN', `could not open PDF: ${pdfPath} (${(err as Error).message})`);\n }\n}\n"],"names":["awaitPdfOpen","openDocument","openPdfForRender","src","data","err","Uint8Array","readFileSync","PdfToMdError","message","getDocument","useSystemFonts","verbosity","VerbosityLevel","ERRORS","promise","PDFJS_DIST_ROOT","path","dirname","resolvePackagePath","CMAP_URL","join","STANDARD_FONT_DATA_URL","WASM_URL","pdfPath","url","cMapUrl","cMapPacked","standardFontDataUrl","wasmUrl","loadingTask"],"mappings":"AAAA,yEAAyE;AACzE,sIAAsI;AACtI,uFAAuF;;;;;;;;;;;;QA8DjEA;eAAAA;;QAjDAC;eAAAA;;QAmCNC;eAAAA;;;sBA/Ca;+DACZ;mBAE2B;wBACf;yBACM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ZC,qBAAqBN;QACrBO,SAASN;QACTX,WAAWC,mBAAc,CAACC,MAAM;IAClC;AACF;AAIO,SAAed,aAAa8B,WAAmC,EAAEN,OAAe;;YAG5EnB;;;;;;;;;;oBADA;;wBAAMyB,YAAYf,OAAO;;;oBAAhC;;wBAAO;;;oBACAV;oBACP,MAAM,IAAIG,sBAAY,CAAC,YAAY,AAAC,uBAAkC,OAAZgB,SAAQ,MAA2B,OAAvB,AAACnB,IAAcI,OAAO,EAAC;;;;;;;IAEjG"}
|
package/dist/esm/pdf-open.js
CHANGED
|
@@ -31,12 +31,13 @@ import { resolvePackagePath } from './resolve.js';
|
|
|
31
31
|
//
|
|
32
32
|
// GOTCHA: despite the `...Url` name, pdfjs's Node loader does `fs.readFile`
|
|
33
33
|
// on the string directly — a `file://` URL silently fails every lookup (only a stderr warning); plain filesystem paths are required.
|
|
34
|
+
// The trailing "/" must be literal (pdfjs rejects a trailing "\"); Windows' fs accepts "/" after a "\" path.
|
|
34
35
|
const PDFJS_DIST_ROOT = path.dirname(resolvePackagePath('pdfjs-dist/package.json'));
|
|
35
|
-
const CMAP_URL = path.join(PDFJS_DIST_ROOT, 'cmaps')
|
|
36
|
-
const STANDARD_FONT_DATA_URL = path.join(PDFJS_DIST_ROOT, 'standard_fonts')
|
|
36
|
+
const CMAP_URL = `${path.join(PDFJS_DIST_ROOT, 'cmaps')}/`;
|
|
37
|
+
const STANDARD_FONT_DATA_URL = `${path.join(PDFJS_DIST_ROOT, 'standard_fonts')}/`;
|
|
37
38
|
// JBIG2/JPEG2000 decoding lives in pdfjs's WASM modules: without this, bitonal
|
|
38
39
|
// scans (the usual encoding for B&W page images) decode to a BLANK page and OCR sees nothing.
|
|
39
|
-
const WASM_URL = path.join(PDFJS_DIST_ROOT, 'wasm')
|
|
40
|
+
const WASM_URL = `${path.join(PDFJS_DIST_ROOT, 'wasm')}/`;
|
|
40
41
|
/**
|
|
41
42
|
* Open a PDF for rendering (raster.ts/tesseract.ts's seam): cMaps + standard
|
|
42
43
|
* fonts wired up, url-based. Callers must `await` the returned task's `.promise` (via `awaitPdfOpen`) and call `.destroy()` when done.
|
package/dist/esm/pdf-open.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/formats/pdf-to-md/src/pdf-open.ts"],"sourcesContent":["// pdf-open.ts — the one seam that opens a PDF via pdfjs-dist, in the two\n// shapes callers need: openDocument (data-based, already-open doc) and openPdfForRender (url-based, task you must await + destroy()).\n// Both wrap a failure the same way: PdfToMdError/PDF_OPEN, original message preserved.\nimport { readFileSync } from 'node:fs';\nimport path from 'node:path';\nimport type { PDFDocumentLoadingTask, PDFDocumentProxy } from 'pdfjs-dist/legacy/build/pdf.mjs';\nimport { getDocument, VerbosityLevel } from 'pdfjs-dist/legacy/build/pdf.mjs';\nimport { PdfToMdError } from './errors.ts';\nimport { resolvePackagePath } from './resolve.ts';\n\n// `verbosity: VerbosityLevel.ERRORS` silences pdfjs's own console.warn calls\n// — the library's documented promise is it never writes to stdout/stderr on its own.\n\n/** Data-based open (collect.ts's seam): no cMaps/fonts — text-layer extraction\n * only, verified to decode CJK correctly. Wraps missing/unreadable and non-PDF files as PdfToMdError/PDF_OPEN. */\nexport async function openDocument(src: string): Promise<PDFDocumentProxy> {\n let data: Uint8Array;\n try {\n data = new Uint8Array(readFileSync(src));\n } catch (err) {\n throw new PdfToMdError('PDF_OPEN', `cannot read ${src}: ${(err as Error).message}`);\n }\n try {\n return await getDocument({\n data,\n useSystemFonts: true,\n verbosity: VerbosityLevel.ERRORS,\n }).promise;\n } catch (err) {\n throw new PdfToMdError('PDF_OPEN', `cannot open ${src} as a PDF: ${(err as Error).message}`);\n }\n}\n\n// Wires up pdfjs's bundled cmaps/standard_fonts so CJK and non-embedded\n// standard fonts resolve instead of falling back to substitute glyphs.\n//\n// GOTCHA: despite the `...Url` name, pdfjs's Node loader does `fs.readFile`\n// on the string directly — a `file://` URL silently fails every lookup (only a stderr warning); plain filesystem paths are required.\nconst PDFJS_DIST_ROOT = path.dirname(resolvePackagePath('pdfjs-dist/package.json'));\nconst CMAP_URL = path.join(PDFJS_DIST_ROOT, 'cmaps')
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/formats/pdf-to-md/src/pdf-open.ts"],"sourcesContent":["// pdf-open.ts — the one seam that opens a PDF via pdfjs-dist, in the two\n// shapes callers need: openDocument (data-based, already-open doc) and openPdfForRender (url-based, task you must await + destroy()).\n// Both wrap a failure the same way: PdfToMdError/PDF_OPEN, original message preserved.\nimport { readFileSync } from 'node:fs';\nimport path from 'node:path';\nimport type { PDFDocumentLoadingTask, PDFDocumentProxy } from 'pdfjs-dist/legacy/build/pdf.mjs';\nimport { getDocument, VerbosityLevel } from 'pdfjs-dist/legacy/build/pdf.mjs';\nimport { PdfToMdError } from './errors.ts';\nimport { resolvePackagePath } from './resolve.ts';\n\n// `verbosity: VerbosityLevel.ERRORS` silences pdfjs's own console.warn calls\n// — the library's documented promise is it never writes to stdout/stderr on its own.\n\n/** Data-based open (collect.ts's seam): no cMaps/fonts — text-layer extraction\n * only, verified to decode CJK correctly. Wraps missing/unreadable and non-PDF files as PdfToMdError/PDF_OPEN. */\nexport async function openDocument(src: string): Promise<PDFDocumentProxy> {\n let data: Uint8Array;\n try {\n data = new Uint8Array(readFileSync(src));\n } catch (err) {\n throw new PdfToMdError('PDF_OPEN', `cannot read ${src}: ${(err as Error).message}`);\n }\n try {\n return await getDocument({\n data,\n useSystemFonts: true,\n verbosity: VerbosityLevel.ERRORS,\n }).promise;\n } catch (err) {\n throw new PdfToMdError('PDF_OPEN', `cannot open ${src} as a PDF: ${(err as Error).message}`);\n }\n}\n\n// Wires up pdfjs's bundled cmaps/standard_fonts so CJK and non-embedded\n// standard fonts resolve instead of falling back to substitute glyphs.\n//\n// GOTCHA: despite the `...Url` name, pdfjs's Node loader does `fs.readFile`\n// on the string directly — a `file://` URL silently fails every lookup (only a stderr warning); plain filesystem paths are required.\n// The trailing \"/\" must be literal (pdfjs rejects a trailing \"\\\"); Windows' fs accepts \"/\" after a \"\\\" path.\nconst PDFJS_DIST_ROOT = path.dirname(resolvePackagePath('pdfjs-dist/package.json'));\nconst CMAP_URL = `${path.join(PDFJS_DIST_ROOT, 'cmaps')}/`;\nconst STANDARD_FONT_DATA_URL = `${path.join(PDFJS_DIST_ROOT, 'standard_fonts')}/`;\n// JBIG2/JPEG2000 decoding lives in pdfjs's WASM modules: without this, bitonal\n// scans (the usual encoding for B&W page images) decode to a BLANK page and OCR sees nothing.\nconst WASM_URL = `${path.join(PDFJS_DIST_ROOT, 'wasm')}/`;\n\n/**\n * Open a PDF for rendering (raster.ts/tesseract.ts's seam): cMaps + standard\n * fonts wired up, url-based. Callers must `await` the returned task's `.promise` (via `awaitPdfOpen`) and call `.destroy()` when done.\n */\nexport function openPdfForRender(pdfPath: string): PDFDocumentLoadingTask {\n // No `worker` option: this pdfjs-dist Node build needs no real Worker thread wired up to run.\n return getDocument({\n url: pdfPath,\n cMapUrl: CMAP_URL,\n cMapPacked: true,\n standardFontDataUrl: STANDARD_FONT_DATA_URL,\n wasmUrl: WASM_URL,\n verbosity: VerbosityLevel.ERRORS,\n });\n}\n\n/** Shared error wrapping for `openPdfForRender`'s task: a raw pdfjs open\n * failure becomes PdfToMdError/PDF_OPEN, original message preserved. */\nexport async function awaitPdfOpen(loadingTask: PDFDocumentLoadingTask, pdfPath: string): Promise<PDFDocumentProxy> {\n try {\n return await loadingTask.promise;\n } catch (err) {\n throw new PdfToMdError('PDF_OPEN', `could not open PDF: ${pdfPath} (${(err as Error).message})`);\n }\n}\n"],"names":["readFileSync","path","getDocument","VerbosityLevel","PdfToMdError","resolvePackagePath","openDocument","src","data","Uint8Array","err","message","useSystemFonts","verbosity","ERRORS","promise","PDFJS_DIST_ROOT","dirname","CMAP_URL","join","STANDARD_FONT_DATA_URL","WASM_URL","openPdfForRender","pdfPath","url","cMapUrl","cMapPacked","standardFontDataUrl","wasmUrl","await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AKD;QACLE,SAASP;QACTQ,YAAY;QACZC,qBAAqBP;QACrBQ,SAASP;QACTR,WAAWV,eAAeW,MAAM;IAClC;AACF;AAEA;sEACsE,GACtE,OAAO,eAAee,aAAaC,WAAmC,EAAEP,OAAe;IACrF,IAAI;QACF,OAAO,MAAMO,YAAYf,OAAO;IAClC,EAAE,OAAOL,KAAK;QACZ,MAAM,IAAIN,aAAa,YAAY,CAAC,oBAAoB,EAAEmB,QAAQ,EAAE,EAAE,AAACb,IAAcC,OAAO,CAAC,CAAC,CAAC;IACjG;AACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effortlessmotion/pdf-to-md",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Extract PDFs to structured markdown: text layer via pdf.js, OCR fallback for image-only pages, pure npm and cross-platform",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pdf",
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@types/mocha": "^10.0.10",
|
|
55
55
|
"@types/node": "^26.2.0",
|
|
56
|
+
"cr": "^0.1.0",
|
|
56
57
|
"node-version-use": "^2.5.0",
|
|
57
58
|
"pdf-lib": "^1.17.1",
|
|
58
59
|
"ts-dev-stack": "^1.22.3",
|