title: MessageBodyWriter not found for media type=application/pdf
body: <p>This does work with Jetty 9</p>
  
  <pre class="lang-java prettyprint-override"><code>@GET
  @Path("pdf/file")
  @Produces("application/pdf")
  public Response getFile() {
      String fileName = Environment.getFilePath() + testFile;
      File file = Environment.getFile(fileName);
  
      Response response = Response.ok((Object) file).build();
      return response;
  }
  </code></pre>
  
  <p>this </p>
  
  <pre class="lang-java prettyprint-override"><code>@GET
  @Path("pdf/plain")
  @Produces("application/pdf")
  public Response getPlainPDF() {
      String formName = Environment.getFilePath() + testFile;
      PDDocument pdfDoc = PDF.getPDFDocument(formName);
      PDStream ps = new PDStream(pdfDoc);
      try {
          OutputStream outputStream = ps.createOutputStream();
          Response response = Response.ok((Object) outputStream).build();
          return response;
      } catch (IOException e) {
          System.out.println("Error creating PDF response " + e.getMessage());
          return null;
      }
  }
  </code></pre>
  
  <p>fails with "MessageBodyWriter not found for media type=application/pdf". Would it be possible to programatically create a PDF with PDFBox and deliver it as PDF File without saving it first somewhere to disk ?</p>