Skip to content

Commit 336fce8

Browse files
committed
fix(backend:files): lower PDF.js verbosity to reduce logging noise
1 parent 665f91a commit 336fce8

File tree

1 file changed

+2
-2
lines changed
  • backend/src/applications/files/utils/doc-textify/adapters

1 file changed

+2
-2
lines changed

backend/src/applications/files/utils/doc-textify/adapters/pdf.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* See the LICENSE file for licensing details
55
*/
66
import path from 'node:path'
7-
import { getDocument, GlobalWorkerOptions, PDFDocumentProxy } from 'pdfjs-dist/legacy/build/pdf.mjs'
7+
import { getDocument, GlobalWorkerOptions, PDFDocumentProxy, VerbosityLevel } from 'pdfjs-dist/legacy/build/pdf.mjs'
88
import { DocTextifyOptions } from '../interfaces/doc-textify.interfaces'
99

1010
// Enable parallel PDF parsing via Node.js worker threads
@@ -25,7 +25,7 @@ export async function parsePdf(filePath: string, options: DocTextifyOptions): Pr
2525

2626
try {
2727
// Load the document, allowing system fonts as fallback
28-
const loadingTask = getDocument({ url: filePath, disableFontFace: true, standardFontDataUrl: standardFontsDir })
28+
const loadingTask = getDocument({ url: filePath, disableFontFace: true, standardFontDataUrl: standardFontsDir, verbosity: VerbosityLevel.ERRORS })
2929
doc = await loadingTask.promise
3030
const fragments: string[] = []
3131
let lastY: number | undefined = undefined

0 commit comments

Comments
 (0)