Create an XpsDocument in a stream

  • Thread starter Thread starter Jeremy
  • Start date Start date
J

Jeremy

Does anybody know how to create an xps document in a stream such as
MemoryStream?

XpsDocument constructors either take a System.IO.Package or a file name, and
System.IO.Package is abstract, so only the static Open method can be called.
Open takes either a file name or a stream, but if I create a memory stream
and pass it to the Open method of System.IO.Package, I get an error "Archive
file cannot be size 0."
 
Back
Top