File size: 473 Bytes
dca8ede
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
// Import our fixed PDF parser that handles the test file issue
import extractPdfData from './pdf-parse-fix';

/**

 * Wrapper for pdf-parse library to avoid hardcoded test file reference

 * @param dataBuffer Buffer containing PDF data

 * @param filePath Optional file path for context

 * @returns Parsed PDF data

 */
export default async function customPdfParse(dataBuffer: Buffer, filePath: string = '') {
  return await extractPdfData(dataBuffer, filePath);
}