Skip to content

extractPdfText ​

Import from: @xbbg/xnews

extractPdfText(bytes): Promise<PdfText>

Defined in: src/pdf.ts (declaration: pdf.d.ts:40)

Extracts the text layer. Throws a config-coded XnewsFetchError when the file is encrypted or carries no text at all, because an empty string is indistinguishable from a blank document.

Parameters ​

bytes ​

Uint8Array

Returns ​

Promise<PdfText>

Last updated:

xbbg is independent open-source software and is not affiliated with, endorsed by, sponsored by, or approved by Bloomberg Finance L.P.