title: Spring 3.0 Java REST return PDF document
body: <p>I have a PDF document generated in the backend. I want to return this using Spring MVC REST framework. What should the MarshallingView and ContentNegotiatingViewResolver look like?</p>
  
  <p>Based on a sample I found, the controller would have this as the return:</p>
  
  <pre><code>return new ModelAndView(XML_VIEW_NAME, "object", 
      byteArrayResponseContainingThePDFDocument);
  </code></pre>
  
  <p>-thank you.</p>