Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I searched the Internet and CodeProject to find help with this subject but I could not find any useful information.

I had some documents and I printed them. I have now lost the important documents.
However, due to my printer settings, I still have the spooled files (*.spl and *.shd).

Is there any way to re-send those files to printer again?

Any suggestion appreciated.
Posted
Updated 17-Nov-10 22:14pm
v2
Comments
Dalek Dave 18-Nov-10 4:15am    
Editied for Grammar, Spelling, Syntax and Readability.

Dont know any app that does it, but here's some info.
The shd file should contain just the print job settings, so you may ignore it.
The spl file contains your print data. It can be recorded in RAW (printer format) or EMF format, dont know what you have.
If its RAW:
It may be in PS or PCL or any other printer standard format. These two are more common. If its PS (file contents usually starts with a % followed by some comments). You should be able to find some ps to pdf converters. Adobe distiller does it. If it's PCL or some other raw format, & if you are a C/C++ developer and can play with the Win32 API, you may open a printer & push the raw data & try to get the print (could use a virtual pdf printer). I'll let you know what functions to use in the API if you want to.

If its EMF:
That's nasty. I dont think its compatible with the standard windows EMF format & it's messy inside. Check this viewer
http://www.codeproject.com/KB/printing/EMFSpoolViewer.aspx[^]

I also found this shareware which claims to view spl files of many internal formats
http://www.prnwatch.com/pviewer.htm[^]

They might print back
 
Share this answer
 
This is a little different from normal printing routines.

Open the printer using OpenPrinter() - make sure you send the data to the same printer.
Call StartDocPrinter()
Note: You must pass a DOC_INFO_1 structure with pDatatype(a member of it) set to "RAW" (upper case). This is not well documented & most programmers get this wrong.
And then call StartPagePrinter()

Now call WritePrinter() passing in all the bytes in the file. (you must have read the file contents before : )

Finally call EndPagePrinter(), EndDocPrinter() & ClosePrinter() in order.

Please see the api documentation for these functions as there is a lot to explain about them.

I still suggest you to use the shareware if it works. The above stuff can take time (& like hell if you're not used to the API)

Good Luck
 
Share this answer
 
Dear strogg625, thank you for your reply.
The spl file format is RAW and does not started with %. I am C++ developer and I would appreciate it if you would let me know what functions to use.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900