ngx-extended-pdf-viewer
Version:
Embedding PDF files in your Angular application. Highly configurable viewer including the toolbar, sidebar, and all the features you're used to.
19 lines (18 loc) • 603 B
TypeScript
/**
* Represents a text item from PDF.js text content extraction.
*/
export interface TextInfoItem {
str: string;
hasEOL?: boolean;
type?: string;
}
/**
* Converts an array of PDF.js text content items into a plain text string.
*
* Items with a `type` property (TextMarkedContent) are filtered out.
* Items with `hasEOL` get a newline appended after their string content.
*
* @param textInfoItems - Array of text items from PDF.js getTextContent()
* @returns The concatenated plain text
*/
export declare function convertTextInfoToText(textInfoItems: Array<TextInfoItem>): string;