I have researched how to reprint spool files in C# for a few days now and I ran into an immediate issue. I have found decent examples and explanations for HOW to print the jobs, but the print job keeps disappearing from the queue and the printer does not print.
Suggested solutions include source code from Microsoft: https://support.microsoft.com/en-us/help/322091
and this:
void printDocument1_PrintPage(object sender, PrintPageEventArgs e)
{
Metafile metafile = new Metafile("SampleMetafile.emf");
e.Graphics.DrawImage(metafile, 10, 10);
}
from a previous Stackoverflow discussion: Can I reprint a spool file?
I tried both and the same problem occurs, the print job appears in the queue, disappears, and no printing nor printing errors occur.
I have found a decent Visual Basic example that works like a charm, but would prefer to avoid having to to launch a separate VB app from my C# app just to grab spool files and send them to another printer.
The VB example is from Code Project: https://www.codeproject.com/Articles/10586/EMF-Printer-Spool-File-Viewer
What I'm hoping for is that someone knows of a similar project example that is in C# or why the print jobs would disappear from the queue without printing even though the C# code I've tried appears to work.
The printer in use is an 'Epson TM-T88V Receipt' device.
Edit: the format of the spool file is EMF