То, что вы ищете, это стандарт границ слов в Юникоде:
http://unicode.org/reports/tr29/tr29-9.html#Word_Boundaries
Здесь есть реализация JavaScript (unciodejs.wordbreak.js)
Добавьте этот заголовок в свой HttpServletResponse:
response.setHeader("Content-Disposition","inline; filename=Here is the Amazing PDF");
Я считаю, что браузер уловит его и используйте его как заголовок окна.
Может быть, я ' Something like this:
<html>
<head>
<title>Here is the amazing PDF</title>
<style type="text/css">
html, body, div, iframe { margin:0; padding:0; height:100%; }
iframe { display:block; width:100%; border:none; }
</style>
</head>
<body>
<iframe width="100%" length="100%" src="myApp/FetchPDFServlet?id=123"/>
</body>
</html>
So instead of linking to a pdf document using myApp/FetchPDFServlet?id=123
, you would link to something that returns the above html. For example, a jsp page: myApp/ShowPDF.jsp?id=123&title=Here%20is%20the%20amazing%20PDF