{
// Initialize Receiver in GenericSender
OpenOfficeService.Objects.GenericSender.Init(
"tcp://localhost:6543/OpenOfficeServiceReceiver");
// Translate path and load up file in byte array, convert it
string source = Server.MapPath("~/SomeWordML.xml");
byte[] wordML = File.ReadAllBytes(source);
byte[] result =
OpenOfficeService.Objects.GenericSender.Receiver.ConvertToPDF(wordML);
// Write response to client
Response.AddHeader("content-type", "application/pdf");
Response.AddHeader("Content-Disposition", "p_w_upload; filename=result.pdf");
Response.BinaryWrite(result);
}