fix: improve pdf parsing with pdfjs-dist fallback
Test Suite / test (24.x) (push) Has been cancelled

This commit is contained in:
Nils-Johan Gynther
2026-05-03 20:11:30 +02:00
parent 19ef7a4ea5
commit 96833f0eea
2 changed files with 4 additions and 2 deletions
@@ -298,7 +298,9 @@ export class ReceiptParsingService {
for (let i = 1; i <= pdfDocument.numPages; i++) {
const page = await pdfDocument.getPage(i);
const textContent = await page.getTextContent();
const pageText = textContent.items.map(item => item.str).join(' ');
const pageText = textContent.items
.map((item: any) => (item.str ? item.str : ''))
.join(' ');
fullText += pageText + ' ';
}
File diff suppressed because one or more lines are too long