mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
fix(tools): surface chars count in pdf-to-text result payload
This commit is contained in:
@@ -22,13 +22,14 @@ export function registerPdfToText(app: FastifyInstance) {
|
||||
|
||||
const outPath = join(ctx.scratchDir, `${base}.txt`);
|
||||
ctx.report(10, "Extracting text");
|
||||
await pdfTextPy(inPath, outPath);
|
||||
const result = await pdfTextPy(inPath, outPath);
|
||||
ctx.report(90, "Done");
|
||||
|
||||
return {
|
||||
scratchPath: outPath,
|
||||
filename: `${base}.txt`,
|
||||
contentType: "text/plain",
|
||||
resultPayload: { chars: result.chars },
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user