When overridden in a derived class, writes the document to a System.IO.Stream.
document The document to write into a System.IO.Stream. stream The System.IO.Stream into which the document is written.