开发者

Displaying A Pdf Document

开发者 https://www.devze.com 2023-03-12 04:27 出处:网络
How to Display a pdf document 开发者_JAVA技巧in a web page(Not seprately,just Inside the webpage) using jsp or servlet?You need to use the <object> or <embed> tag to contain the adobe read

How to Display a pdf document 开发者_JAVA技巧in a web page(Not seprately,just Inside the webpage) using jsp or servlet?


You need to use the <object> or <embed> tag to contain the adobe reader and point to your pdf file.

something like: <embed src="YourFile.pdf" width="500" height="375">

another answer here: EMBED vs. OBJECT


You need to set the content type for this on response. call response.setContentType("aplication/pdf"); before writing anything to stream.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号