Saving Print Output to Database

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?
 
H

HaySeed

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
 
D

Duncan Jones

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top