///
import { Paper } from 'academia/types';
import { Page, ContentStream, Resources } from '../models';
import { Rectangle, Container } from './geometry';
export interface TextSpan extends Rectangle {
fontName: string;
fontSize: number;
fontBold: boolean;
fontItalic: boolean;
buffer: Buffer;
text: string;
}
export declare type Word = Container;
export declare type Line = Container;
export declare type Column = Container;
export declare type Paragraph = Container;
/**
When we render a page, we specify a ContentStream as well as a Resources
dictionary. That Resources dictionary may contain XObject streams that are
embedded as `Do` operations in the main contents, as well as sub-Resources
in those XObjects.
*/
export declare function renderLayout(outerBounds: Rectangle, contentStreamBuffer: Buffer, resources: Resources, skipMissingCharacters?: boolean): Container>>[];
export declare function renderLayoutFromPage(page: Page, skipMissingCharacters?: boolean): Container>>[];
export declare function renderLayoutFromContentStream(contentStream: ContentStream, skipMissingCharacters?: boolean): Container>>[];
export interface SectionContainer {
title: Paragraph[];
paragraphs: Paragraph[];
}
/**
Group a list of lines into sections (title / paragraph sequences)
*/
export declare function groupSections(paragraphs: Paragraph[], header_fontSize: number): SectionContainer[];
/**
Recombine an array of arbitrary TextSpan Containers into an array of Sections
each paragraph contains lines
each line contains word groups
each word group contains TextSpans
*/
export declare function paperFromParagraphs(paragraphs: Container>>[]): Paper;