I have used jquery.fileDownload and Spring for downloading .pdf files through Ajax.
我使用jquery.fileDownload和Spring通过Ajax下载.pdf文件。
The application is working fine and the pdf is downloading successfully. The problem is that Instead of downloading I want the pdf to be opened within a new Browser Tab.
该应用程序运行正常,pdf正在下载成功。问题是,我希望在新的浏览器选项卡中打开pdf而不是下载。
Can anyone please tell me some solution for this
任何人都可以告诉我一些解决方案
Server Side
I am using Spring at the server side
我在服务器端使用Spring
@RequestMapping(value = "exportPDF", method = RequestMethod.POST, produces = APP_JSON)
@ResponseBody
public void getPDF(final HttpServletResponse response, @RequestParam(value = "empId", required = true) final String empId) throws IOException, Exception
{
final byte[] pdf= ExportPDFUtil.getFileBytes(empId); //