Hi, how do I set the title of an browser embedded PDF document?
The browser shows my JSP page name in the title bar and the Adobe plugin
uses that as a default file name to save to. I'd like to change it to make
it dynamic to the information being displayed.
I've tried addTitle and addSubject as well as writing an HTML header and
title to the response before opening the document.
The JSP page does not write any HTML to the page prior to opening the PDF
doc. However, I have tried adding a standard HMTL header and title without
any luck.
In short, here's what I do...
<%
......
response.setContentType("application/pdf");
// Create and set the document attributes
Document document = new Document(PageSize.LETTER, 50,
50, 30, 48);
document.addAuthor("XXX");
document.addTitle("YYY");
document.addSubject("ZZZ");
document.addCreationDate();
// Create the PDF doc writer
ServletOutputStream os = response.getOutputStream();
PdfWriter writer = PdfWriter.getInstance(document,
os);
// Open the doc
document.open();
......
%>
Thanks...ed
Ed Zappulla
BSG Systems, LLC
2 Corral Circle
Lebanon, NJ 08833
Phone: (908) 246-5304 | Email: [email protected] | AIM: zappued1 |
Yahoo: ed.zappulla | Google: ed.zappulla | Skype: ed.zappulla
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions:
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/