Skip to content

Commit b259461

Browse files
committed
Revert "Update src/tools/pdf/markdown.ts"
This reverts commit 134047f.
1 parent 307d302 commit b259461

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/tools/pdf/markdown.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,8 @@ async function loadPdfToBuffer(source: string): Promise<Buffer | ArrayBuffer> {
2323
export async function parsePdfToMarkdown(source: string, pageNumbers: number[] | PageRange = []): Promise<PdfParseResult> {
2424
try {
2525
const data = await loadPdfToBuffer(source);
26-
const byteData = data instanceof Uint8Array ? data : new Uint8Array(data);
2726

2827
// @ts-ignore: Type definition mismatch for ESM usage
29-
return await pdf2md(byteData, pageNumbers);
3028
return await pdf2md(new Uint8Array(data), pageNumbers);
3129

3230
} catch (error) {

0 commit comments

Comments
 (0)