fix(SmartPdf): Fix type for extractTextFromPdfBuffer function

This commit is contained in:
Philipp Kunz 2025-02-25 18:06:45 +00:00
parent 1188643c4b
commit babc20649a
3 changed files with 7 additions and 2 deletions

View File

@ -1,5 +1,10 @@
# Changelog
## 2025-02-25 - 3.2.1 - fix(SmartPdf)
Fix type for extractTextFromPdfBuffer function
- Corrected the parameter type from Buffer to Uint8Array for extractTextFromPdfBuffer function.
## 2025-02-25 - 3.2.0 - feat(smartpdf)
Improve dependency versions and optimize PDF to PNG conversion.

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@push.rocks/smartpdf',
version: '3.2.0',
version: '3.2.1',
description: 'A library for creating PDFs dynamically from HTML or websites with additional features like merging PDFs.'
}

View File

@ -212,7 +212,7 @@ export class SmartPdf {
};
}
public async extractTextFromPdfBuffer(pdfBufferArg: Buffer): Promise<string> {
public async extractTextFromPdfBuffer(pdfBufferArg: Uint8Array): Promise<string> {
const deferred = plugins.smartpromise.defer<string>();
const pdfParser: any = new plugins.pdf2json();
pdfParser.on('pdfParser_dataReady', (pdfData: any) => {