This will realize the entire document in memory, which is unacceptable for printing large documents.