Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Yes, it is. I've done it in C#, writing a PDF printer controlled by software.</p> <p>Steps to achive your goal are:</p> <ol> <li>Create a new port using <a href="http://pages.cs.wisc.edu/~ghost/redmon/index.htm" rel="nofollow">RedMon</a></li> <li>Set port for sending output to your application</li> <li>Write an application that gets incoming stream and send it wherever you want</li> </ol> <p>Here is a bunch of code for your custom application:</p> <pre><code> string fname = Environment.GetEnvironmentVariable("TEMP") + @"\"; fname += DateTime.Now.ToString("yyyyMMdd-hhmmss-fffff") + ".ps"; FileStream fs = new FileStream(fname, FileMode.Create); StreamWriter sw = new StreamWriter(fs); StreamReader sr = new StreamReader(Console.OpenStandardInput()); sw.Write(sr.ReadToEnd()); sw.Flush(); sw.Close(); sr.Close(); </code></pre> <p>I edit my post to answer your comment:</p> <ol> <li>you can easily use Redmon on Windows7. I do with my printer without any problem and I think you can do it in Windows 2008 too. If you want to discover how you can do install redmon port without installer take a look at PDFCreator setup source. If you want I can you explain how to do that and could post a C# implementation, but I don't think this is what you need now.</li> <li>You can use your single Redmon port with any number of printers, not only one; when your software receive spooled job from printer, using environment vars Redmon set up for you, you can read the name of the printer sending the job... so you can decide what to do according to that.</li> </ol>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload