perf: 文件拆分

This commit is contained in:
archer
2023-04-03 21:04:38 +08:00
parent becee69d6a
commit 85e11abc0a
3 changed files with 14 additions and 13 deletions

View File

@@ -76,7 +76,7 @@ export const readPdfContent = (file: File) =>
const page = await doc.getPage(pageNo);
const tokenizedText = await page.getTextContent();
const pageText = tokenizedText.items.map((token: any) => token.str).join('');
return pageText.replaceAll(/\s+/g, '\n');
return pageText;
};
let reader = new FileReader();