set the mapping for the servlet to be
myPrintWorthFile.pdf
 
i.e. in web.xml
 
....
<servlet>
    <servlet-name>foo</servlet-name>
    <servlet-class>com.woger.foo</servlet-clas>
</servlet>
.....
<servlet-mapping>
    <servlet-name>foo</servlet-name>
    <url-pattern>/myPrintWorthFile.pdf</url-pattern>
 </servlet-mapping>
 
 
This has the additional advantage of helping retarded browsers (IE 4 anyone?) realise that you are sending a pdf file.  Most should be fine with anyname as long as you set the mime type but having a .pdf extension can help.
----- Original Message -----
To: FOP
Sent: Friday, September 24, 2004 12:41 PM
Subject: PDF: no border, file name

Hi,
my gernerated pdf file which I download form my printServlet, does not show any
border:
    <fo:region-body border="solid 2pt red"/>
is without effect.
 
My second question: In my printServlet I take the OutputSream form the response
and give it to the driver:
    OutputStream out = response.getOutputStream();
    driver.setOutputStream(out);
How can I set a name for the file to be downloaded. The name I get is the name of
the Servlet (vertually Struts Action) that is invoked by the print button or print link,
without any file extension.
So its name is somePrintPrepareAction instead of myPrintWorthFile.pdf.
Some suggestions ?
 
Wolfgang
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.762 / Virus Database: 510 - Release Date: 16/09/04

Reply via email to