Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Virtual printer : intercept data sent to printer using c#

i'm creating a PDF Creator equivalent and I have to add some options to it while using C# language.

I would like to know how I can intercept data that was sent to the printer and how I can save it in a c# variable.

My printer launches the program as follows. Redmon is used as a redirection port
enter image description here

like image 532
Fabien Papet Avatar asked Jul 06 '26 22:07

Fabien Papet


1 Answers

Program's like Redmon allow you to save the data to file. Save it as a temp file then pass in the filename as a command line argument. You could also pass it in as stdin/stdout which is how Redmon passes it into Ghostscript but temp file solution should work well and is easy to implement.

like image 178
Douglas Anderson Avatar answered Jul 09 '26 10:07

Douglas Anderson



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!