-
-
Notifications
You must be signed in to change notification settings - Fork 17
getTables returns empty tables #82
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
I'm prototyping a Node application to parse pdf files.
Version 2.4.5
Here is a code snippet:
if (mimeType !== "application/pdf") {
throw new Error(`Unsupported file type: ${mimeType}`);
}
try {
const parser = new PDFParse({ url: path });
const info = await parser.getInfo({ parsePageInfo: true });
const text = await parser.getText();
const table = await parser.getTable();
console.log(table);
await parser.destroy();
} catch (error) {
console.error("Error processing PDF:", error);
throw error;
}
return "OK";
The following is logged to the console:
Pr {
pages: [ { num: 1, tables: [] }, { num: 2, tables: [] } ],
mergedTables: [],
total: 2
}
The input file is a two page pdf with 11 prominent tables, like this

Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working