API Documentation for ContentsTokenizer
NoPoDoF ContentsTokenizer
This class is a parser for the content streams in a Document.
class ContentsTokenizer {
new(doc: Base, pageIndex: number): ContentsTokenizer
readSync(): Iterator<string>
read(cb: Callback<string>): void
}
Constructors
Creates a new ContentsTokenizer for a Document Page. A Range Error will be thrown if the
pageIndex
is less than zero or greater than getPageCount
.
new(doc: Document, pageIndex: number): ContentsTokenizer
Properties
Methods
readSync
readSync(): Iterator<string>
Reads a Page's contents stream into an array returning an array iterator.
read
read(cb: Callback<string>): void
Reads a Page's contents stream, decodes when/where the stream has been encoded and returns as a string.