Printing from Emacs on Windows

I’m a Emacs guy and this is how I got it printing on on of my Windows boxes (XP SP2) where I already had Cygwin.

1. Install PDF Creator.

2. Update .emacs file with the following:
(setenv "PRINTER" "PDFCreator")
(setq ps-printer-name "PDFCreator")
(setq ps-printer-name-option "-d")
(setq ps-lpr-command "/cygwin/bin/lpr")

3. Print into a PDF file with ps-print-buffer and then to any printer (or not at all).

How to Retrieve Task Info

This is how to retrieve a task info in you have the task MOR:

ObjectContent[] objs =
   connection.ServiceContent.propertyCollector, new PropertyFilterSpec[]
      new PropertyFilterSpec()
          objectSet = new ObjectSpec[]
             { new ObjectSpec() { obj = taskMOR } },
          propSet = new PropertySpec[]
             new PropertySpec()
                all = false, allSpecified = true,
                type = "Task", pathSet = new String[] { "info" }
TaskInfo result = (TaskInfo)objs[0].propSet[0].val;