RE: IE reloads the PDF document generated from servlet multiplet imes (2 times!)

2002-03-07 Thread Sharan, Dharmendra
Hi Savino,

 Thanks so much, it works for me.
 It definitely saves the extra time spent in reload of servlet.

 However I used the cache-control directive for IE :-

 --
 response.setHeader("Cache-Control", "max-age=10"); // workaround so IE
does not refresh/reload PDF page again/twice
 --

  regds,

  Dharmendra

-Original Message-
From: Savino, Matt C [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 07, 2002 1:51 PM
To: '[EMAIL PROTECTED]'
Subject: RE: IE reloads the PDF document generated from servlet
multiplet imes (2 times!)


This is a known issue. There seem to be several approaches, which may depend
on your particular situation. There's a full discusssion of this on the
fop-dev list under the subject 'FO -> PDF works with Netscape, not with IE'
which has the code for my solution (you can find it in the archives if not
subscribed). I believe this is also going to be in the FAQ soon. 

Please let me know if you have more questions.

-Matt



> -----Original Message-
> From: Sharan, Dharmendra [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 07, 2002 9:41 AM
> To: [EMAIL PROTECTED]
> Subject: IE reloads the PDF document generated from servlet multiple
> times (2 times!)
> 
> 
> Hi FOP Users,
> 
>Has anyone come across the problem of Servlet getting 
> called multiple
> times by IE (ver 5.5)
> 
>I use the following to render PDF using an input source, 
> however I see in
> log that that IE calls my servlet 2 times!
> 
>I use the following code as in the example for embedding 
> fop in servlet -
> --
> response.setContentType("application/pdf");
> Driver driver = new Driver(inputSource,
> response.getOutputStream());
> driver.setRenderer(Driver.RENDER_PDF);
> driver.run();
> --
> 
> Aparently I noticed that after the first time my servlet is done
> processing the XSLT, IE 5.5 launches the PDF pluggin!,
> The PDF pluggin again repeats the whole XSLT transform, 
> and only then it
> display the PDF output.
> 
> Anybody has similar experience with IE 5.5 ? any 
> ideas/suggestions are
> appreciated.
> 
> Thanks!,
> 
> Dharmendra
> 


IE reloads the PDF document generated from servlet multiple times (2 times!)

2002-03-07 Thread Sharan, Dharmendra
Hi FOP Users,

   Has anyone come across the problem of Servlet getting called multiple
times by IE (ver 5.5)

   I use the following to render PDF using an input source, however I see in
log that that IE calls my servlet 2 times!

   I use the following code as in the example for embedding fop in servlet -
--
response.setContentType("application/pdf");
Driver driver = new Driver(inputSource,
response.getOutputStream());
driver.setRenderer(Driver.RENDER_PDF);
driver.run();
--

Aparently I noticed that after the first time my servlet is done
processing the XSLT, IE 5.5 launches the PDF pluggin!,
The PDF pluggin again repeats the whole XSLT transform, and only then it
display the PDF output.

Anybody has similar experience with IE 5.5 ? any ideas/suggestions are
appreciated.

Thanks!,

Dharmendra


Dynamic Header in Page Sequence [region-before]

2002-02-12 Thread Sharan, Dharmendra
Hi XSL FOP Developers,

  I want to ask if it is possible to have a dynamic Header implemented
in a Page-Sequence.

  something like ...


  
 
Car: 
   
 
  


  

 

 
 
 
 
 

  


  Assuming an XML like :-

   

  
  
  

  
  
  

   


   Any ideas ? Is there a better way to achieve the same results ? Any
helps/hints/suggestions appreciated.

   Thanks!,

   Dharmendra


Recall: Dynamic Header in Page Sequence [region-before]

2002-02-12 Thread Sharan, Dharmendra
Sharan, Dharmendra would like to recall the message, "Dynamic Header in Page
Sequence [region-before]".


Dynamic Header in Page Sequence [region-before]

2002-02-12 Thread Sharan, Dharmendra
Hi XSL FOP Developers,

  I want to ask if it is possible to have a dynamic Header implemented
in a Page-Sequence.

  something like ...


  
 
From: 
   
To: 
   
 
  


  

 

 
 
 
 
 

  


  Assuming an XML like :-

   

  
  
  

  
  
  

   


   Any ideas ? Is there a better way to achieve the same results ? Any
helps/hints/suggestions appreciated.

   Thanks!,

   Dharmendra


RE: Does fo:basic-link work with 0.20.1 ?

2002-01-28 Thread Sharan, Dharmendra
Hi Anil,

   use something like...


   
  URL:
   
   
   
  
 
  
   


[EMAIL PROTECTED] may be replaced with your URL...eg.http://www.oracle.com or
as a variable shown in example above

   hth,

   Dharmendra

-Original Message-
From: Anil Pinto [mailto:[EMAIL PROTECTED]
Sent: Sunday, January 27, 2002 7:53 PM
To: [EMAIL PROTECTED]
Subject: Does fo:basic-link work with 0.20.1 ?


Hi all,

I was trying out the fo:basic-link but couldn't get it
to work.

Was wondering if has successfully used it

I am using the tag within a fo:block as follows


http://www.oracle.com";
color="blue" text-decoration="underline">Oracle

 

any help will be greatly appreciated :-)

Anil.

__
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com


PDF - displaying GIF under UNIX

2002-01-25 Thread Sharan, Dharmendra
Hi Fop Users,

 Have you ever tried to display GIF images on Unix within PDF generated
using XSL FO ?

 I am able to get the same working in Windoze, however on Unix it throws
an exception :-

java.lang.UnsatisfiedLinkError: exception occurred in JNI_OnLoad
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1382)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1298)
at java.lang.Runtime.loadLibrary0(Runtime.java:749)
at java.lang.System.loadLibrary(System.java:820)
at
sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:53)
at java.security.AccessController.doPrivileged(Native Method)
at
sun.awt.image.NativeLibLoader.loadLibraries(NativeLibLoader.java:41)
at sun.awt.image.GifImageDecoder.(GifImageDecoder.java:367)
at
sun.awt.image.InputStreamImageSource.getDecoder(InputStreamImageSource.java:
222)
at sun.awt.image.URLImageSource.getDecoder(URLImageSource.java:142)
at
sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:251
)
at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:217)
at sun.awt.image.ImageFetcher.run(ImageFetcher.java:185)

I am using JDK1.3, and have all the XSL FOP jars in the "CLASSPATH" and
LD_LIBRARY_PATH has "/opt/jdk-1.3/jre/lib/sparc"

Is there anything I am missing ? Any help appreciated.

   Thanks!

   Dharmendra


Unsatisfied link error on Unix: using FOP for PDF output with GIFs

2002-01-14 Thread Sharan, Dharmendra
Hi,

I was trying to generate PDF file using XSL:FO and when the path to
image(gif) is incorrect
the PDF does shows up without the GIF.
however, when the path is corrrect, it tries to load the GIF it runs
into Unsatidfied Link Error.

   I was wondering if FOP needs any particular X11 library on Unix for
drawing the Gifs 

Parsing of document complete, stopping renderer
java.lang.UnsatisfiedLinkError: exception occurred in JNI_OnLoad
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1382)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1298)
at java.lang.Runtime.loadLibrary0(Runtime.java:749)
at java.lang.System.loadLibrary(System.java:820)
at
sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:53)
at java.security.AccessController.doPrivileged(Native Method)
at
sun.awt.image.NativeLibLoader.loadLibraries(NativeLibLoader.java:41)
at sun.awt.image.GifImageDecoder.(GifImageDecoder.java:367)
at
sun.awt.image.InputStreamImageSource.getDecoder(InputStreamImageSource.java:
222)
at sun.awt.image.URLImageSource.getDecoder(URLImageSource.java:142)
at
sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:251
)
at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:217)
at sun.awt.image.ImageFetcher.run(ImageFetcher.java:185)

   Any ideas ? What must be included in LD_LIBRARY_PATH ?

Thanks (in anticipation!),

Dharmendra


Problem trying to change page Header dynamically...

2001-12-21 Thread Sharan, Dharmendra
Hi FOP Users,

Seems like I am not doing something right and would appreciate your
input/thoughts on the same...

I am trying to have the header for the page to vary depending on the
information being displayed

I tried to define xsl variables in the "fo:region-before" section and
try to modify the same from within the "fo:region-body" in the fo:flow
element. but it just picks the initial value of the variable and repeats the
same for all the pages..

Also I tried to call a template from within the same instead of the
using the variable, and got similar results..


So here's the problem,
I would get the text data to display for header, while I am processing
the xml
from within the fo:flow element ie. "", 
however the header is within the "
 
any thoughts? ideas...??

Thanks (in anticipation!),

Dharmendra


alignment of leader/rule ?

2001-09-21 Thread Sharan, Dharmendra
Hi,

   I am using Fop-0.20.1 and have been trying to have a fo:leader to be
aligned in the "middle"/"center",
   however it defaults to the "baseline"/"bottom".

   ie. it is currently like the following :-


THIS IS A TITLE LINE
_
here are the details on the tile

-


   However I want it to be as follows :-


THIS IS A TITLE LINE
  [this line should be a "solid"
line as shown in above, but vertically aligned in the center/middle]
here are the details on the tile

-

   I have looked at 'alignment-adjust' and 'alignment-baseline' however I
get the warning that it is not implemented yet!.

   Is there a different approach to the same ? or anything I am missing
something here ? pls. help.

   Thanks (in anticipation!),

   Dharmendra


Using FOP in Servlet - *dynamically* generating XSL:FO using XML and XSLT

2001-09-04 Thread Sharan, Dharmendra
Hi,

I am trying to have use XSL:FOP through servlet and I was hoping to use
XML and XSLT to dynamically generate the XSL:FOP format file to be passed to
Driver for rendering as PDF.

   The example which comes with distribution uses xmlFile and xslFile,
however I wanted to generate the XML and XSL at run time and to be able to
pass the output into the Driver for rendering a PDF.

However I found that currently XSLTInputHandler constructor only accepts
xmlFile and xslFile?

Is there a possible way where I can have the xsl:fo be generated
dynamically and be able to pass it to Driver as an InputSource for
rendering. (since InputSource constructor does accept/allow InputStream)

Am I missing something ? or Do I need to write my own handler ?

I am lost here... pls. help.

Thanks (in anticipation!),

Dharmendra


Unix - FOP throwing classdef not found error

2001-08-28 Thread Sharan, Dharmendra
Hi,

 I am getting java runtime errors on Unix, I had copied all the relevant
jars ie. fop.jar  xalan-2.0.0.jar   batik.jar   jimi-1.0.jar
xalanj1compat.jar,  however I am using an older version of xerces
(xerces.jar) instead of xerces.jar-1.2.3.jar since the rest of classes that
I am using require that.

I do not get any errors on the fonts and I do the messages from the
driver.run() call... here's the stackTrace for the same :-

Is there anything I am missing ?? Is there anything I am missing on the
LD_LIBRARY_PATH ?? or could be caused by the older version of xerces ???
I am reading the "xsl:fo" file and am using "font-family" as
'sans-serif' in the xsl:fo format file for PDF generation. The same however
does work on WinNT with SP6.  Any pointers/help would be appreciated.

Thanks (in anticipation!),

Dharmendra

PS: PDF generation is really cool! ;-)


--
 [1Tue Aug 28 16:41:40 EDT 2001:  Servlet failed
with Exception
java.lang.NoClassDefFoundError
at org.apache.fop.layout.LineArea.addSpacedWord(LineArea.java:1307)
at org.apache.fop.layout.LineArea.addText(LineArea.java:324)
at org.apache.fop.fo.FOText.addRealText(FOText.java:272)
at org.apache.fop.fo.FOText.addText(FOText.java:239)
at org.apache.fop.fo.FOText.layout(FOText.java:151)
at org.apache.fop.fo.flow.BasicLink.layout(BasicLink.java:118)
at org.apache.fop.fo.flow.Block.layout(Block.java:260)
at org.apache.fop.fo.flow.Flow.layout(Flow.java:150)
at org.apache.fop.fo.flow.Flow.layout(Flow.java:109)
at
org.apache.fop.fo.pagination.PageSequence.format(PageSequence.java:295)
at
org.apache.fop.apps.StreamRenderer.render(StreamRenderer.java:166)
at
org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:155)
at
org.apache.xerces.parsers.SAXParser.endElement(SAXParser.java:1398)
at
org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValidator
.java:1019)
at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XM
LDocumentScanner.java:1256)
at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.
java:381)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:948)
at org.apache.fop.apps.Driver.render(Driver.java:424)
at org.apache.fop.apps.Driver.run(Driver.java:508)
at
com.gs.eq.horizon.view.ReportServlet.renderFO(ReportServlet.java:64)
at
com.gs.eq.horizon.view.ReportServlet.process(ReportServlet.java:44)
at com.gs.eq.horizon.view.HorizonBase.doProcess(HorizonBase.java:98)
at com.gs.eq.horizon.view.HorizonBase.doGet(HorizonBase.java:30)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:124)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:755)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:703)
at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
Manager.java:247)
at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:361)
at
weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:261)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)


--