Saving Print Output to Database

  • Thread starter Thread starter HaySeed
  • Start date Start date
H

HaySeed

I need to save print output to the database for future retrieval.

I assumed that the best way to do this was to use a BinaryFormatter to
convert my PrintDocument to a byte array - strore the binary stream - then
deserialize it upon recall.

Unfortunately the PrintDocument is not serializable.

How can I store the completed PrintDocument to the DB?
 
Thanks for the response Duncan,

I know I can create an output file which can be streamed into the DB but my
ultimate goal is to reconstitute the PrintDocument class. Is this
possible????

If not, my second choice would be to print it to PDF and stream that file.
I have used a Win2PDF print driver in the past to do create the PDF output
but I'm wondering oif thereis any "ToPDF" functionality built into .Net that
you are aware of ?



L
 
I would suggest maybe printing it to XPS - using the stuff built in to the
latest .NET framework.
An XPS document is just XML and jpegs in a structured document so it should
be fairly easy to divide it and store it in a database?
 
Back
Top