Set filename of the Pdf that is streamed back to the browser

后端 未结 6 911
太阳男子
太阳男子 2021-02-06 03:01

I have a Java webapp creating a pdf and streaming it back to the browser.

 byte[] pdf = report.exportPdfToArray(user);
response.setContentType(\"application/pdf         


        
6条回答
  •  滥情空心
    2021-02-06 03:28

    I can't detect a flaw. Did you check the behavior with other browsers/readers?

    As of RFC, it is not defined what the client has to do do with the filename information if displayed inline...

提交回复
热议问题