# gizlang:pdf

the words of a PDF file (ISO 32000-2), as search and reading need them: each page's text in the order its content streams draw it, a line where the text moves to another line and a space where it jumps right (by the font's glyph widths). Objects are found by scanning the file, so a broken cross-reference table does not matter; object streams are opened; FlateDecode, ASCIIHexDecode and ASCII85Decode streams are decoded. A font reads by its ToUnicode CMap; a simple font without one reads as WinAnsi with its Differences. An encrypted file and a picture of text (a scan) have no words here.

```gizlang
import * as Pdf from "gizlang:pdf";
```

## Functions

### `text`

```gizlang
function text(data: bytes, most: i64): string throws string
```

The text of the PDF file `data`, at most `most` bytes of it (cut after a whole character): its pages in order, an
empty line between two pages.

Effects: fail.

