|
Hey, this is my first post on this list so please be patient if this is an obvious question. I am writing a program which will stream a PDF from a servlet, open it, print it without user interferance, and close it, returning to the previous page. I have accomplished all but the last step, closing and returning back. I tried coding it so that after it prints, it will call history.back(), but this doesn't work. Pleas advise someone, I'm in a real jam here.
Here's the snippet of code this is using
PdfWriter writer = PdfWriter.getInstance(document, baos); document.open(); PdfAction jAction = PdfAction._javascript_ ("this.print(false,this.pageNum, this.pageNum,false); \r", writer); writer.addJavaScript(jAction); writer.addJavaScript("history.back(); \r"); document.add(new Paragraph("This is the test text to be printed. Blah Blah.")); document.close();
Thanks in advance
Timothy Smith CGI 5099 Creekbank Rd. |
