You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Ma...@spe.sony.com on 2004/08/11 21:48:24 UTC
How to tell Driver to open acrobat in a new IE?
I am parsing my XML file through FOP parser and then telling the driver to
render it as PDF. The process is initiated by clicking on a button on IE.
What happens is the current IE instance opens the acrobat and displays the
PDF it.
The users have to hit back button to get back to the application.
My question is how do i tell the Driver to open the PDF in a separate
instance of acrobat (within a new IE instance) or just by acrobat
independently.
Thanks
Manoj
My sample code is below
public void renderXML(XSLTInputHandler input,
HttpServletResponse response) throws ServletException
{
try {
ByteArrayOutputStream out = new ByteArrayOutputStream();
response.setContentType(CONTENT_TYPE);
Driver driver = new Driver();
String OS = System.getProperty("os.name");
driver.setLogger(log);
driver.setErrorDump(true);
driver.setRenderer(Driver.RENDER_PDF);
driver.setOutputStream(out);
driver.render(input.getParser(), input.getInputSource());
byte[] content = out.toByteArray();
response.setContentLength(content.length);
response.getOutputStream().write(content);
response.getOutputStream().flush();
} catch (Exception ex) {
throw new ServletException(ex);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: How to tell Driver to open acrobat in a new IE?
Posted by ar...@cappelino.de.
Manoj_Nair@spe.sony.com wrote on 11.08.2004 21:48:24:
> I am parsing my XML file through FOP parser and then telling the driver
to
> render it as PDF. The process is initiated by clicking on a button on
IE.
> What happens is the current IE instance opens the acrobat and displays
the
> PDF it.
>
> The users have to hit back button to get back to the application.
>
> My question is how do i tell the Driver to open the PDF in a separate
> instance of acrobat (within a new IE instance) or just by acrobat
> independently.
First: this is not a question for fop-dev. fop-dev is a mailing list for
people working on the source code of FOP
Second: you cannot tell the Driver to do that - not because it's not
implemented, but because it's not possible. You must change your HTML
and/or JavaScript to tell the browser to open a new window for the link.
Hope this helps,
Arnd
--
Arnd Beißner
Cappelino Informationstechnologie GmbH
RE: How to tell Driver to open acrobat in a new IE?
Posted by Subbiah <su...@utdallas.edu>.
This is a very simple requirement and I think it not with our control. It is
the users clinet setting and it is very easy to set.
The options are .
1. Modify prefrences in IE to open pdf in new window
2. Modify the sevrlet that renders the pdf so that it pops up a a new window
3. Modify the servlet that renders the pdf to send the response as
attachemnet so that the user needs to save/open the file when he clisck on
pdf like
response.setHeader("Content-Disposition", "attachment;filename="+fileName);
But 1 is the best option and 2 is the work around.
If you need help in 2 and 3 mail back
This is from http://www.adobe.com/support/techdocs/98fe.htm
Configuring the browser to open PDF files in an Acrobat window
If you want the browser to open PDF files in a separate Acrobat window,
configure the browser to use Acrobat or Adobe Reader as a helper
application. Then, when you select a PDF file in IE or AOL, the browser
opens the PDF file in an Acrobat window instead of the browser window.
To configure the browser to use Acrobat 6.0 or Adobe Reader 6.0 to open PDF
files:
1. Exit from IE or AOL.
2. Start Acrobat or Adobe Reader.
3. Choose Edit > Preferences.
4. Select Internet in the list on the left.
5. Deselect Display PDF in Browser, and click OK.
6. Restart IE or AOL.
regards,
Subbiah Shenbagaraman
Software System Specialist
QuEST Forum Software Development
The University of Texas at Dallas
972 883 6849
subbiah@tl9000rrs.org
-----Original Message-----
From: Manoj_Nair@spe.sony.com [mailto:Manoj_Nair@spe.sony.com]
Sent: Wednesday, August 11, 2004 2:48 PM
To: fop-dev@xml.apache.org
Cc: fop-user@xml.apache.org
Subject: How to tell Driver to open acrobat in a new IE?
I am parsing my XML file through FOP parser and then telling the driver to
render it as PDF. The process is initiated by clicking on a button on IE.
What happens is the current IE instance opens the acrobat and displays the
PDF it.
The users have to hit back button to get back to the application.
My question is how do i tell the Driver to open the PDF in a separate
instance of acrobat (within a new IE instance) or just by acrobat
independently.
Thanks
Manoj
My sample code is below
public void renderXML(XSLTInputHandler input,
HttpServletResponse response) throws ServletException
{
try {
ByteArrayOutputStream out = new ByteArrayOutputStream();
response.setContentType(CONTENT_TYPE);
Driver driver = new Driver();
String OS = System.getProperty("os.name");
driver.setLogger(log);
driver.setErrorDump(true);
driver.setRenderer(Driver.RENDER_PDF);
driver.setOutputStream(out);
driver.render(input.getParser(), input.getInputSource());
byte[] content = out.toByteArray();
response.setContentLength(content.length);
response.getOutputStream().write(content);
response.getOutputStream().flush();
} catch (Exception ex) {
throw new ServletException(ex);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org