title: REST web services method to display pdf file in browser
body: <p><br>
      I am new to the REST web services with this REST am doing some small examples, and i have a problem with producing PDF file. following method am using to produce PDF file.</p>
  
  <pre><code>@GET
  @Produces("application/pdf")
  public Response ReadPDF() {
      File file = new File("fileName.pdf");
      ResponseBuilder response = Response.ok((Object) file);
      response.header("Content-Disposition",  "attachment; filename=restfile.pdf");
      return response.build();
  }
  </code></pre>
  
  <p>this method working fine and provides pdf file to download, so on call of this REST method browser asking (save or open) option. but i wanted to display the PDF file in browser by default.</p>