We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 307d302 commit b259461Copy full SHA for b259461
src/tools/pdf/markdown.ts
@@ -23,10 +23,8 @@ async function loadPdfToBuffer(source: string): Promise<Buffer | ArrayBuffer> {
23
export async function parsePdfToMarkdown(source: string, pageNumbers: number[] | PageRange = []): Promise<PdfParseResult> {
24
try {
25
const data = await loadPdfToBuffer(source);
26
- const byteData = data instanceof Uint8Array ? data : new Uint8Array(data);
27
28
// @ts-ignore: Type definition mismatch for ESM usage
29
- return await pdf2md(byteData, pageNumbers);
30
return await pdf2md(new Uint8Array(data), pageNumbers);
31
32
} catch (error) {
0 commit comments