RE: servlet called thrice on IE 4.0

2001-11-20 Thread Shkuro, Yuri

I can't specify the source of this advice exactly, because I forgot
it (it was somewhere on Microsoft's website), but what the article
said was that when IE sends these multple requests, they are actually
different in something like "UserAgent" http header (a better header 
they couldn't find!).  Only the last request needs to return the actual 
PDF document, the first one or two requests only look for Content-Type 
of the response.

If you investigate (by dumping all fields from the HttpServletRequest)
and find something of this kind, please post to the list.

YS

-Original Message-
From: David Frankson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 20, 2001 4:02 PM
To: [EMAIL PROTECTED]
Subject: Re: servlet called thrice on IE 4.0


It is a behavior that is unavoidable in IE.  I cache the pdf and return
it on the second hit.

Dave


- Original Message -
From: "Savino, Matt C" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 20, 2001 11:09 AM
Subject: servlet called thrice on IE 4.0


> I know this has been discussed here before, but I just wanted to ask in
case
> anyone has discovered a solution. Basically I'm etting that problem where
IE
> is calling the FOP servelt twice. Only on Weblogic, the second call seems
to
> be causing a socket error. The net result is that the servelt has to be
> called three times to actually work (I've pasted the output below). I've
> verified that IE 4.72 and beyond don't see this problem. Just wondering if
> anyone ever found a fix.
>
> Thanks a lot,
> Matt
>
>
> Below is the output from ONE call to
> http://localhost:7001/resultview/ReportGenerator.jsp?counter=25  (the
> 'counter=' piece is put in to avoid IE-early-version caching problem):
>
>
> servlet: session ID =
>
O1qHKkV5IXQWz0y11xfOSj8vbLdv3Uzl9lVf5mSDqcEHTJtX7mca!-2004853107!-1675706787
> !7001!7002!1006274346312
> ReportGeneratorServlet says hiTue Nov 20 09:09:49 PST 2001
> srd.contentType = pdf
> srd.reportId = 1001
> reportProps.getProperty(report1001) = lr
> Writing XML source to: C:\bea\wlserver6.1\ReportOutput.xml
>
> Writing FO source to: C:\bea\wlserver6.1\ReportOutput.xml
>
> building formatting object tree
> setting up fonts
>  [1] [2]
> Parsing of document complete, stopping renderer
> Initial heap size: 45687Kb
> Current heap size: 52679Kb
> Total memory used: 6991Kb
>   Memory use is indicative; no GC was performed
>   These figures should not be used comparatively
> Total time used: 1688ms
> Pages rendererd: 2
> Avg render time: 844ms/page
> servlet: session ID =
>
O1qHKkV5IXQWz0y11xfOSj8vbLdv3Uzl9lVf5mSDqcEHTJtX7mca!-2004853107!-1675706787
> !7001!7002!1006274346312
> ReportGeneratorServlet says hiTue Nov 20 09:09:51 PST 2001
> srd.contentType = pdf
> srd.reportId = 1001
> reportProps.getProperty(report1001) = lr
> Writing XML source to: C:\bea\wlserver6.1\ReportOutput.xml
>
> Writing FO source to: C:\bea\wlserver6.1\ReportOutput.xml
>
> building formatting object tree
> setting up fonts
>  [1] [2]
> Parsing of document complete, stopping renderer
> Initial heap size: 53805Kb
> Current heap size: 61054Kb
> Total memory used: 7249Kb
>   Memory use is indicative; no GC was performed
>   These figures should not be used comparatively
> Total time used: 1563ms
> Pages rendererd: 2
> Avg render time: 781ms/page
>   
> <[WebAppServletContext(1024240,RVWebApp1,/RVWebApp1)] Root cause of
> ServletException
> java.net.SocketException: Connection aborted by peer: socket write error
> at java.net.SocketOutputStream.socketWrite(Native Method)
> at java.net.SocketOutputStream.write(SocketOutputStream.java:83)
> at
>
weblogic.servlet.internal.ChunkUtils.writeChunkNoTransfer(ChunkUtils.java:20
> 2)
> at
> weblogic.servlet.internal.ChunkUtils.writeChunks(ChunkUtils.java:167)
> at
weblogic.servlet.internal.ChunkOutput.flush(ChunkOutput.java:248)
> at
> weblogic.servlet.internal.ChunkOutput.checkForFlush(ChunkOutput.java:306)
> at
weblogic.servlet.internal.ChunkOutput.write(ChunkOutput.java:197)
> at
>
weblogic.servlet.internal.ChunkOutputWrapper.write(ChunkOutputWrapper.java:1
> 25)
> at
>
weblogic.servlet.internal.ServletOutputStreamImpl.write(ServletOutputStreamI
> mpl.java:155)
> at java.io.OutputStream.write(OutputStream.java:61)
> at
>
com.questdiagnostics.applications.resultview.servlet.ReportGeneratorServlet.
> renderPdf(ReportGeneratorServlet.java:171)
> at
>
com.questdiagnostics.applications.resultview.servlet.ReportGeneratorServlet.
> renderReport(ReportGeneratorServlet.java:120)
> at
>
com.questdiagnostics.applications.resultview.servlet.ReportGeneratorServlet.
> service(ReportGeneratorServlet.java:67)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
> :265)
> at
>
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.

RE: New FOP Code Don't Work

2001-11-19 Thread Shkuro, Yuri

> I could not get "driver.setLogger(logger);" to compile.  
> The versions I have of FOP (0.19 and 0.20.1) do not have a
  ^^^

  Wow!  You neglected to mention that, didn't you? ;-)  I guess
I had to be more specific about which version of FOP I use when
I posted the code.

  0.20.1 never worked for me at all, I had to build from CVS
until 0.20.2RC came out.  With 0.19 the method works, but
FOP doesn't really produce the PDF on the fly, instead it
builds the whole FO tree in memory, and after the parsing is
done you have to call 

driver.format();
driver.render();

In other words, you don't buy much by using SAX events with 0.19.
0.20.2RC has a major improvement for more streamlined processing.

Yuri.

-Original Message-
From: Jim Urban [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 19, 2001 3:02 PM
To: [EMAIL PROTECTED]
Subject: RE: New FOP Code Don't Work


The method that calls my renderFo creates the iInputSource as follows:
Source iInputSource= new StreamSource(new StringReader(xmlString));

My translator is cached, and worked fine with my orginal code.

I get no exceptions.  Where would I see error messages?

I could not get "driver.setLogger(logger);" to compile.  The versions I have
of FOP (0.19 and 0.20.1) do not have a
org.apache.fop.apps.Driver.setLogger(org.apache.log.Logger) method.

I am using Xalan/Xerces, does this matter?

Jim

-Original Message-
From: Shkuro, Yuri [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 19, 2001 1:42 PM
To: '[EMAIL PROTECTED]'
Subject: RE: New FOP Code Don't Work


As far as I can tell, the code is correct (although you didn't indicate
how you create iInputSource).  Are you sure you are not getting any
exceptions, error messages, etc.?


> -Original Message-
> From: Jim Urban [mailto:[EMAIL PROTECTED]]
> Sent: Monday, November 19, 2001 2:38 PM
> To:   [EMAIL PROTECTED]
> Subject:  New FOP Code Don't Work
>
> Recently someone suggested using SAX events to run XML through XSLT then
> FOP and to send the PDF back to the browser from a servlet.  I tried
> implmenting this (see code below) but all I don't get any output back.  I
> even routed the output to a file, and the file was empty.  My old code
> worked great, but I was told I was wasting memory.  Can someone tell me
> why this code does not work?
>
> Thanks,
>
> Jim Urban
> Product Manager
> Netsteps Inc.
> Suite 505E
> 1 Pierce Pl.
> Itasca, IL  60143
> Voice:  (630) 250-3045 x2164
> Fax:  (630) 250-3046
>
>
>   public void renderFO(Transformer pdfTransformer, Source
> iInputSource, HttpServletResponse uResponse)
>   {
>   try
>   {
>   OutputStream out = uResponse.getOutputStream();
>   uResponse.setContentType("application/pdf");
>   Driver driver = new Driver();
>   driver.setRenderer(driver.RENDER_PDF);
>   driver.setOutputStream(out);
>   // ---
>   // Create SAXResult based on FOP Driver content
> handler
>   // which will accept SAX events and build FOP tree
>   // ---
>   Result saxResult = new
> SAXResult(driver.getContentHandler());
>
>   // Use the Transformer to transform an XML Source
> and
>   // send the output to a Result object. Implicitely
> it will
>   // create the FOP tree by firing SAX events.
>   pdfTransformer.transform(iInputSource, saxResult);
>
>   // The user is already viewing the PDF!
>   out.flush();
>   out.close();
>   }
>   catch (TransformerException e1)
>   {
>   System.err.println("Unable to generate PDF:  " +
> e1.toString());
>   }
>   catch (IOException e2)
>   {
>   System.err.println("File error:  " + e2.toString());
>   }
>   }
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: New FOP Code Don't Work

2001-11-19 Thread Shkuro, Yuri

As far as I can tell, the code is correct (although you didn't indicate 
how you create iInputSource).  Are you sure you are not getting any
exceptions, error messages, etc.?  


> -Original Message-
> From: Jim Urban [mailto:[EMAIL PROTECTED]]
> Sent: Monday, November 19, 2001 2:38 PM
> To:   [EMAIL PROTECTED]
> Subject:  New FOP Code Don't Work
> 
> Recently someone suggested using SAX events to run XML through XSLT then
> FOP and to send the PDF back to the browser from a servlet.  I tried
> implmenting this (see code below) but all I don't get any output back.  I
> even routed the output to a file, and the file was empty.  My old code
> worked great, but I was told I was wasting memory.  Can someone tell me
> why this code does not work?
> 
> Thanks,
> 
> Jim Urban
> Product Manager
> Netsteps Inc.
> Suite 505E
> 1 Pierce Pl.
> Itasca, IL  60143
> Voice:  (630) 250-3045 x2164
> Fax:  (630) 250-3046
> 
> 
>   public void renderFO(Transformer pdfTransformer, Source
> iInputSource, HttpServletResponse uResponse)
>   {
>   try
>   {
>   OutputStream out = uResponse.getOutputStream();
>   uResponse.setContentType("application/pdf");
>   Driver driver = new Driver();
>   driver.setRenderer(driver.RENDER_PDF);
>   driver.setOutputStream(out);
>   // ---
>   // Create SAXResult based on FOP Driver content
> handler
>   // which will accept SAX events and build FOP tree
>   // ---
>   Result saxResult = new
> SAXResult(driver.getContentHandler());
> 
>   // Use the Transformer to transform an XML Source
> and
>   // send the output to a Result object. Implicitely
> it will
>   // create the FOP tree by firing SAX events.
>   pdfTransformer.transform(iInputSource, saxResult);
> 
>   // The user is already viewing the PDF!
>   out.flush();
>   out.close();
>   }
>   catch (TransformerException e1)
>   {
>   System.err.println("Unable to generate PDF:  " +
> e1.toString());
>   }
>   catch (IOException e2)
>   {
>   System.err.println("File error:  " + e2.toString());
>   }
>   }   
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: Question on XSLTInputHandler

2001-11-13 Thread Shkuro, Yuri

If your string XML is going to be run through XSLT like Xalan,
it WILL BE parsed anyway, and most likely it will be parsed using
a SAX parser (the default Xalan behavior).  Therefore there is no
overhead whatsoever compared to what you would do in any other
solution.  In fact, if you look at the code I sent yesterday, the
main issue was not with parsing the original XML (this is given),
but with avoiding the necessity to store the intermediate xsl:fo
document that comes out of the transformer before being fed into
FOP.  By using SAX events at this point you save a lot of memory
and streamline the process.

Yuri.

-Original Message-
From: Ulrich Mayring [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 4:24 AM
To: [EMAIL PROTECTED]
Subject: Re: Question on XSLTInputHandler


[EMAIL PROTECTED] wrote:
> 
> You can use org.apache.fop.apps.Driver to get the
> org.xml.sax.helpers.DefaultHandler and fire sax events on that.

Well, my XML is unparsed and in the form of a java.lang.String, so
parsing it just to fire SAX events seems to be a bit of an overhead, no?
You're probably wondering where my XML is coming from, if it is
unparsed, a String and not from a file. Well, here goes:

I load an XML document from a file. I receive some XML fragments via a
socket connection and merge it rather unceremoniously with the XML from
the file (via textual replace basically). Then I do some database stuff,
which gives me more XML fragments, and I merge them in as well. So, the
XML document I have in the end is a java.lang.String and it has been
created without any parsing or other standard XML procedures. I'm
looking for speed in this case, not intelligence :-)

Anyway, thanks everyone for the many tips, I think I'll be able to solve
my problem :)

cheers,

Ulrich
-- 
Ulrich Mayring
DENIC eG, Systementwicklung

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: Question on XSLTInputHandler

2001-11-12 Thread Shkuro, Yuri

I've already posted this code to the list, but 
will do it again.  I would like to see it finding 
its place on http://xml.apache.org/fop/embedding.html
one day - shouldn't we promote efficient use of FOP 
instead  of giving an example of embedding, which is 
technically correct but hardly userful for servlet 
developers?

The code below has the following benefits compared to
Jim's example:
  - all transformations are done in a single pass
by chaining SAX events
  - the resulting PDF is not stored in memory, but
 streamed directly into the output stream
(in Jim's example, it is first stored in a string,
 then converted to byte array, and only then is
 writted to the output stream)



import javax.xml.transform.Source;
import javax.xml.transform.Result;
import javax.xml.transform.stream.StreamSource;
import javax.xml.transform.sax.SAXResult;
import javax.xml.transform.Templates;
import javax.xml.transform.Transformer;
import org.apache.fop.apps.Driver;

// ---
// 1. Get a Source for XML document
// ---

 // a) from string
Source strSource = new StreamSource(new StringReader(xmlString));

 // b) from file
Source fileSource = new StreamSource(xmlFile);

 // c) from JDOM Document 
Source domSource = new org.jdom.transform.JDOMSource( jdomDocument )

// ---
// 2. Get stylesheet transformer
// ---
 // from file, see above examples for other types of XSL input
Templates template = transformerFactory.newTemplates( new StreamSource(
xslFile ));
 // note - template object is multi-threaded and should be cached if you
plan
 // to use the same XSL repeatedly
Transformer transformer = template.mewTransformer();

// ---
// 3. Create FOP driver and set rendering mode and output stream
// ---
Driver driver = new Driver();
driver.setRenderer(driver.RENDER_PDF);
driver.setOutputStream( response.getOutputStream() );
// initialize logger - see sample code on FOP website
driver.setLogger(logger);

// ---
// 4. Create SAXResult based on FOP Driver content handler 
// which will accept SAX events and build FOP tree
// ---
Result saxResult = new SAXResult( driver.getContentHandler() );

// 5. Use the Transformer to transform an XML Source and 
// send the output to a Result object. Implicitely it will 
// create the FOP tree by firing SAX events.
transformer.transform( whateverSource, saxResult );

// 6. Your user is already viewing the PDF!
response.getOutputStream().flush();
response.getOutputStream().close();

Yuri Shkuro
HR - Information Technology
Goldman Sachs & Co., New York

-Original Message-
From: Jim Urban [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 12, 2001 2:08 PM
To: [EMAIL PROTECTED]
Subject: RE: Question on XSLTInputHandler


Here is a block of code our of one my servlets. This code takes a string
containing XML, applies an XSL:FO style sheet to it, and runs the XML:FO
through FOP and send s the PDF directly back to the browser.

Writer  out = new StringWriter();
Transformer pdfTransformer  =
NsTransformerCollection.loadTransformer("my.xsl");;
String xmlString = .
Source  xmlSource  = new StreamSource(new StringReader(xmlString));
pdfTransformer.transform(xmlSource, new StreamResult(out));
out.close();
String fopstring = out.toString();
InputSource foSource = getInput(fopstring);
try
{
 ByteArrayOutputStream out = new ByteArrayOutputStream();
 uResponse.setContentType("application/pdf");
 Driver driver = new Driver(iInputSource, out);
 driver.setRenderer(Driver.RENDER_PDF);
 driver.run();
 byte[] content = out.toByteArray();
 uResponse.setContentLength(content.length);
 uResponse.getOutputStream().write(content);
 uResponse.getOutputStream().flush();
 uResponse.flushBuffer();
}
catch (Exception e){}

Jim


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 12, 2001 12:49 PM
To: [EMAIL PROTECTED]
Subject: Question on XSLTInputHandler


Hello,

I've looked at the example servlet and found that the XSLTInputHandler
takes as input a java.io.File. However, I am constructing the XML
document dynamically and have it as a java.lang.String in memory. It
seems unnecessary I/O to write it out to a temporary file, just to pass
it to the XSLTInputHandler. Looking at the source of
XSLTInputHandler.java I didn't find any alternate way to call it. What
would the recommended procedure be in this case, where I already have
the XML document in memory?

thanks in advance for any pointers,

Ulrich

--
Ulrich Mayring
DENIC eG, Systementwicklung


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: NameSpace??

2001-10-30 Thread Shkuro, Yuri

I had this problem when I had old IBM's parser.jar hanging
around in the classpath.  Even putting xerces.jar in front
didn't help, I had to explicitely set up the parser factory:

System.setProperty( "javax.xml.parsers.SAXParserFactory", 
"org.apache.xerces.jaxp.SAXParserFactoryImpl" );

However, your problem may be completely unrelated.

YS


-Original Message-
From: Gerard van Wijk [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 30, 2001 5:41 AM
To: '[EMAIL PROTECTED]'
Subject: NameSpace??


Hello,

ClassLoader loader = this.getClass().getClassLoader();
URL url = loader.getResource("cv.xsl");
System.out.println(url);

TransformerFactory tFactory = TransformerFactory.newInstance();
Transformer transformer = tFactory.newTransformer(new StreamSource(new
File(url.getFile(;



[2001/10/30 11:35:02][1 ][I]: ** Transformer Factory error
[2001/10/30 11:35:02][1 ][I]:
javax.xml.transform.TransformerConfigurationException:
javax.xml.transform.TransformerException: Namespace not supported by
SAXParser


Does anyone know this error?




Gerard

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: Table Column-Headers

2001-10-29 Thread Shkuro, Yuri

Sorry, what I said applies to f:table-header, which I am using. 
Don't know about table-caption.

-Original Message-
From: Shkuro, Yuri 
Sent: Monday, October 29, 2001 9:42 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Table Column-Headers


Chris,
 
  I am using fo:table-caption successfully.  Not sure what kind of feedback
you are looking for.
BTW, I don't know what you mean by "fo:table-caption can host a table" - it
should contain row
definitions, just as fo:table-body, with the same number of columns (the
columns widths will be
defined prior to that, as usual for fo:table-body).  The only difference
between caption and body
is that the latter will be repated if the table spans multiple pages.
 
Yuri.

-Original Message-
From: West, Chris [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 24, 2001 7:50 PM
To: '[EMAIL PROTECTED]'
Subject: Table Column-Headers



I'm dynamically generating a table that can have a variable number of rows.
In the situation where the table spans multiple pages, I would like to have
the first row contain the column labels.  I've been able to do this using a
style sheet, but it requires that the height of each row be fixed (which I
would like to avoid).  From the documentation, fo:table-caption can host a
table, which could be set up to be a one-row table that contains the column
headers.  From what I've read, this caption can be made to repeat after
crossing a page boundary.  Before trying this, I'd like to get some feed
back from those more experienced with FOP regarding this approach.  I'm
using the latest version, 20.2.

Thanks in advance, 

Chris W. 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: Table Column-Headers

2001-10-29 Thread Shkuro, Yuri

Chris,
 
  I am using fo:table-caption successfully.  Not sure what kind of feedback
you are looking for.
BTW, I don't know what you mean by "fo:table-caption can host a table" - it
should contain row
definitions, just as fo:table-body, with the same number of columns (the
columns widths will be
defined prior to that, as usual for fo:table-body).  The only difference
between caption and body
is that the latter will be repated if the table spans multiple pages.
 
Yuri.

-Original Message-
From: West, Chris [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 24, 2001 7:50 PM
To: '[EMAIL PROTECTED]'
Subject: Table Column-Headers



I'm dynamically generating a table that can have a variable number of rows.
In the situation where the table spans multiple pages, I would like to have
the first row contain the column labels.  I've been able to do this using a
style sheet, but it requires that the height of each row be fixed (which I
would like to avoid).  From the documentation, fo:table-caption can host a
table, which could be set up to be a one-row table that contains the column
headers.  From what I've read, this caption can be made to repeat after
crossing a page boundary.  Before trying this, I'd like to get some feed
back from those more experienced with FOP regarding this approach.  I'm
using the latest version, 20.2.

Thanks in advance, 

Chris W. 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: Making PDFby combining different XML files???

2001-10-24 Thread Shkuro, Yuri

How about this:

echo '' > book.xml
cat chapter*.xml | grep -v '> book.xml
fop.sh -xsl rajeev.xsl -xml book.xml -pdf rajeev.pdf

?


-Original Message-
From: sunitha nair [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 24, 2001 1:21 AM
To: [EMAIL PROTECTED]
Subject: RE:Making PDFby combining different XML files???


hello sir,
Thanx for ur prompt response.but i think u couldn't
understand my question.In the commandline i'm using
java -cp org.apache.fop.apps.Fop -xsl rajeev.xsl -xml
rajeev.xml -pdf rajeev.pdf

that is rajeev.xml is the final xml file which contain

lot of chapter xml files.I need chapter files because 
i want to make pdf of individual chapter other than
pdf of entire book as user demands.
so my question is how i combine all that chapter files
into a single xml file so that i can use the above
command line and make the book pdf.
as per the above commandline i'm inputting .xml and
.xsl(eventhough using the xsl-fo tags).
how i make pdf of a book ,if there are two chapter xml
files...chapter1.xml & chapter2.xml using fop with the

same .xsl file for styling.
please take cocern.
regards
sunitha
 --- "Shkuro, Yuri" <[EMAIL PROTECTED]> wrote: > Why
do you need entities in FOP input?  If you use
> different
> stylesheets for different chapters, write a Makefile
> to 
> XSLT them into fo files, then merge and feed into
> FOP.
> If you use the same XSL for all chapters, then you
> can use
>  to pull all chapters into a single XML
> file
> and transform it to FO.
> 
> FOP is FO-2-PDF converter, not XML-2-PDF, so it's
> really 
> up to you how to create an FO file from multiple XML
> files.
> 
> YS
> 
> -Original Message-
> From: sunitha nair
> [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 23, 2001 5:54 AM
> To: [EMAIL PROTECTED]
> Subject: making pdf by combining different xml
> files???
> 
> 
> Hi all,
> Is it possible to make pdf from different xml data
> files using fop.
> my real need is to make a book on pdf format.I made
> different xml file for different chapters and an xsl
> file for styling.If it possible to use  dtd entity
> to
> combine all xml files and make pdf by that final xml
> file.Since fop needs an xml and xsl file it is
> necessary for me to make a xsl for the final xml
> file(combination of individual chapter XMLs) to make
> the final book.What xsl I use for component(chapter)
> xml files.if i use href=".." in chapter xml files
> will
> the convertion take place correctly.I tried many
> ways.
> but was invain.Is FOP supportDTD and entity
> references?
> can anyone please help me.
> 
> regards
> sunitha
> 
>

> *NEW*   Connect to Yahoo! Messenger through your
> mobile phone   *NEW*
>Visit
> http://in.mobile.yahoo.com/smsmgr_signin.html
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, email:
> [EMAIL PROTECTED]
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, email:
> [EMAIL PROTECTED]
>  


   *NEW*   Yahoo! Messenger for SMS   *NEW*
  Now on your ORANGE phone
 Visit http://in.mobile.yahoo.com/smsmgr_signin.html

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: DO NOT REPLY [Bug 4377] New: - JDK 1.1 non-compliance

2001-10-23 Thread Shkuro, Yuri

JDK 1.1 support was voted to be discontinued about a month ago.
You may find relevant discussion in the list archive.

Please invalidate your bug report.

YS

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 23, 2001 3:46 PM
To: [EMAIL PROTECTED]
Subject: DO NOT REPLY [Bug 4377] New: - JDK 1.1 non-compliance


DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4377

JDK 1.1 non-compliance

   Summary: JDK 1.1 non-compliance
   Product: Fop
   Version: all
  Platform: All
OS/Version: All
Status: NEW
  Severity: Major
  Priority: Other
 Component: pdf renderer
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


There is a requirement that Fop run on JDK 1.1.x.  It currently will not run
on
anything earlier than JDK 1.2.  I tested this on JDK 1.1.3 for the Sun.  The
reason is because the code is calling a method that was introduced in JDK
1.2. 
Namely, java.io.File.getParentFile().  This call is being made from:

Options.java line 96

as well as 3 other files.  Here is the error reported upon execution of Fop:

java org.apache.fop.apps.Fop cv_2001.fo cv_2001.pdf
java.lang.NoSuchMethodError: java.io.File: method
getParentFile()Ljava/io/File;
not found
at org.apache.fop.apps.Options.setCommandLineOptions(Compiled Code)
at org.apache.fop.apps.CommandLineStarter.(Compiled Code)
at org.apache.fop.apps.CommandLineOptions.getStarter(Compiled Code)
at org.apache.fop.apps.Fop.main(Compiled Code)

BTW- The version options on this form are (0.15, 0.16, 0.17), which seems to
be
outdated.  I found this defect in version 0.20.1 and 0.20.2.

ANOTHER (possible) defect:

I don't know if this is related to the defect above, but when I try to build
the
application on a Sun Ultra 10 with 512 megs of memory, I get this error:

java.lang.OutOfMemoryError
at java.io.BufferedReader.(Compiled Code)
at java.io.BufferedReader.(Compiled Code)
at sun.tools.java.ScannerInputStream.(Compiled Code)
at sun.tools.java.Scanner.useInputStream(Compiled Code)
at sun.tools.java.Scanner.(Compiled Code)
at sun.tools.java.Parser.(Compiled Code)
at sun.tools.javac.BatchParser.(Compiled Code)
at sun.tools.javac.BatchEnvironment.parseFile(Compiled Code)
at sun.tools.javac.Main.compile(Compiled Code)
at org.apache.tools.ant.taskdefs.compilers.Javac12.execute(Compiled
Code)
at org.apache.tools.ant.taskdefs.Javac.execute(Compiled Code)
at org.apache.tools.ant.Target.execute(Compiled Code)
at org.apache.tools.ant.Project.runTarget(Compiled Code)
at org.apache.tools.ant.Project.executeTarget(Compiled Code)
at org.apache.tools.ant.Project.executeTargets(Compiled Code)
at org.apache.tools.ant.Main.runBuild(Compiled Code)
at org.apache.tools.ant.Main.main(Compiled Code)
[javac] error: An error has occurred in the compiler; please file a bug
report (http://java.sun.com/cgi-bin/bugreport.cgi).
[javac] 1 error

BUILD FAILED

/home/jgombos/tools/package/Fop-0.20.1/build.xml:544: Compile failed,
messages
should have been provided.

I have not investigated this error, but thought it may be useful to document
it.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: making pdf by combining different xml files???

2001-10-23 Thread Shkuro, Yuri

Why do you need entities in FOP input?  If you use different
stylesheets for different chapters, write a Makefile to 
XSLT them into fo files, then merge and feed into FOP.
If you use the same XSL for all chapters, then you can use
 to pull all chapters into a single XML file
and transform it to FO.

FOP is FO-2-PDF converter, not XML-2-PDF, so it's really 
up to you how to create an FO file from multiple XML files.

YS

-Original Message-
From: sunitha nair [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 23, 2001 5:54 AM
To: [EMAIL PROTECTED]
Subject: making pdf by combining different xml files???


Hi all,
Is it possible to make pdf from different xml data
files using fop.
my real need is to make a book on pdf format.I made
different xml file for different chapters and an xsl
file for styling.If it possible to use  dtd entity to
combine all xml files and make pdf by that final xml
file.Since fop needs an xml and xsl file it is
necessary for me to make a xsl for the final xml
file(combination of individual chapter XMLs) to make
the final book.What xsl I use for component(chapter)
xml files.if i use href=".." in chapter xml files will
the convertion take place correctly.I tried many ways.
but was invain.Is FOP supportDTD and entity
references?
can anyone please help me.

regards
sunitha


*NEW*   Connect to Yahoo! Messenger through your mobile phone   *NEW*
   Visit http://in.mobile.yahoo.com/smsmgr_signin.html

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: Antwort: page numbering problem...

2001-10-19 Thread Shkuro, Yuri

Use different IDs for each report.  E.g., at the beginning
of declare


or


and then use it to mark the ending block



YS

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 18, 2001 8:40 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: Antwort: page numbering problem...



thanx Joerg.
It worked ...
but one problem still persists. I actually wanted to display page 1 of
"". But in this case, I can't do it coz FOP does not allow to
declare a block with same id more than once in a document. So the known
method of getting the total page numbers () can't work here as it does not let me declare the block with
this name in every page sequence.
Moreover is there any limitation with the maximum number of page sequences
we can have in one document.?

Is there any wayout
Please help
thanks
wali



Hi wali,
>I creat a PDF document which have reports for different customers.  One
>document can contain many reports. Now I want to mark the pages for
reports
>individually. i.e.
...
>Every new report starts at new page. and every report can consist of
>different number of pages.

Create a page sequence for each report. If you are creating the
FO via XSLT, and if you have the reports in individual XML
elements (here called "report"), you can use something like
  
   
 
   Report 
   
 
 
   
   Page

 
 
   
 

  

Tailor this to your needs. Of course you'll have to define
a page master "report" (you may have different page masters
for the title page, the TOC, appendices etc.)

HTH

Joerg Pietschmann




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: [vote] Merging JFor with FOP

2001-10-18 Thread Shkuro, Yuri

With proper care it is always possible to restructure
the distribution so that unnecessary classes are not
included.  There are Ascii, PCL and PDF renderers in FOP
- each can be in a separate jar file with no compile-time
dependencies from the main jar, so if you don't use some
format, drop the jar and be happy.  Same applies to other
included jars, like batik and logkit - they are not 
necessarily needed for everybody.

Unfortunately, I don't have free time to volunteer to do
this sort of decoupling of FOP subsystems, nor do I have
a pressing need for it.

My unofficial vote for merging JFor with FOP is:  +1

YS

-Original Message-
From: Alistair Hopkins [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 18, 2001 11:46 AM
To: [EMAIL PROTECTED]
Subject: RE: [vote] Merging JFor with FOP


Can I just appeal for some limitation on the size of the JAR files required?

Not all java is server side and downloads sizes matter a lot!

Alistair

[still thinks Swing is a good idea]
[but so is rtf]

-Original Message-
From: Beer, Christian [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 18, 2001 3:54 PM
To: '[EMAIL PROTECTED]'
Subject: AW: [vote] Merging JFor with FOP


Although I am not a committer, I would like to give following
unofficial vote: 1+;

[...snip...]
So, here it is, please vote on the following question:

would you like to accept jfor code and give Bertand Delacretaz committer
status in order to perform the merging on the FOP code following the
technical directions that the FOP dev community will find more
appropriate?

I remind that only people with committer status are entitled to place a
binding vote, but I suggest everybody on this list to express their vote
and, in case of negative vote, explain their reasons so that we can
properly deal with them.

Thanks to all.

Stefano.

P.S. Sorry for the formality, people but this is legal stuff so I'm
required to wear my ASF member hat :)


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: Problems with embedding graphics using fo:instream-foreign-object and svg...

2001-10-18 Thread Shkuro, Yuri

Jim,

  Your example is clear to me, but it's different from 
Christian's case - he does embed external files, that's
why I was curious why do it via svg.  Maybe his files
are svg, that would explain it.  I though he meant GIFs
or something.

Yuri.

-Original Message-
From: Jim Urban [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 18, 2001 9:36 AM
To: [EMAIL PROTECTED]
Subject: RE: Problems with embedding graphics using
fo:instream-foreign-object and svg...


We generate our PDFs on the fly dynamically.  These PDFs include dynamically
generated graphs.  It is vary convenient to embed the graphs (as SVG images)
inline rather then creating .svg files and then deleting them after
generating the PDFs.

Jim

-Original Message-----
From: Shkuro, Yuri [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 18, 2001 8:27 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Problems with embedding graphics using
fo:instream-foreign-object and svg...


  Could somebody please point out what is the benefit of
using  ...
instead of   ?

Thanks,
YS

-Original Message-
From: Beer, Christian [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 18, 2001 4:02 AM
To: Fop-liste (E-Mail)
Subject: Problems with embedding graphics using
fo:instream-foreign-object and svg...


Hi Folks!

I wanted to embed images using:

  

  


But I get the SVG-Error-Image. Before I updatet to the newest SVG-Version
that worked
fine... What has happend???

Christian

__
DIRON Wirtschaftsinformatik GmbH & Co. KG
Christian Beer  ([EMAIL PROTECTED])
Daimlerweg 39-41Tel. : +49(251)979-200
48163 Muenster  Fax  : +49(251)979-2020
Germany Email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: Problems with embedding graphics using fo:instream-foreign-object and svg...

2001-10-18 Thread Shkuro, Yuri

  Could somebody please point out what is the benefit of 
using  ...
instead of   ?

Thanks,
YS

-Original Message-
From: Beer, Christian [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 18, 2001 4:02 AM
To: Fop-liste (E-Mail)
Subject: Problems with embedding graphics using
fo:instream-foreign-object and svg...


Hi Folks!

I wanted to embed images using:

  

  


But I get the SVG-Error-Image. Before I updatet to the newest SVG-Version
that worked
fine... What has happend???

Christian

__
DIRON Wirtschaftsinformatik GmbH & Co. KG
Christian Beer  ([EMAIL PROTECTED])
Daimlerweg 39-41Tel. : +49(251)979-200
48163 Muenster  Fax  : +49(251)979-2020
Germany Email: [EMAIL PROTECTED]  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: Embedding fop in IE..Help!!!

2001-10-15 Thread Shkuro, Yuri

I used JSP to stream out PDF files successfully.
What may be happenning in your case is that the
whitespace between <%!%>  <%%> is written to the
output stream before you start writing the PDF content.
Try calling clearBuffer() on the output stream first.

YS

-Original Message-
From: Rajagopal. V [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 15, 2001 2:49 PM
To: [EMAIL PROTECTED]
Subject: Re: Embedding fop in IE..Help!!!


Hi
Im using a JSP to generate this PDF. I am able to open
other "Static" pdfs.
This is what i do, i create a bytearrayoutputstream
which will hold the output of the render and then use
a 

pageContext.getOut().print();

and this results in printing binary content on the
screen.. I assume this is bcoz IE doesnt recognize the
content type and print jst prints it on the screen,
whereas Netscape understands the Content Type and
displays it as a PDF.
I tried to create a servlet which will generate the
PDF(using streams to generate the output) and it works
in IE and Netscape.

Now, is it not possible to render a PDF using
JSP(especially on IE)?? IS there a way?

Thanks
Raj

--- Amit <[EMAIL PROTECTED]> wrote:
> Can you open other pdf files (via a link in a html
> page) in IE?
> 
> 
> "Rajagopal. V" wrote:
> 
> > Hi All
> > I have an XML file which i combine with a XSL to
> > generate the FO file and render it. It works fine
> with
> > Netscape but im having a tough time with IE. It is
> > displaying garbage on teh screen. All i get is
> binary
> > characters for the PDF File. I have IE 5.5 Sp1.
> and i
> > tried all the workarounds. These are the ones I
> tried
> > 1) Changed the name of the file to be .pdf so that
> IE
> > will look at the extension and treat it as PDF
> >
> > 2) Bloated the file size to be more than 8k so
> that
> > there is no buffer problem with IE
> >
> > 3) Downloaded the Fo file generated and ran the fo
> > command line and it generates the PDF properly(as
> an
> > application). So there is nothing wrong with the
> FO.
> >
> > IS there any other way to get a PDF on IE? Im not
> sure
> > why im getting binary content all over the screen?
> >
> > Please HElpp...
> >
> > TIA
> > Raj
> >
> > __
> > Do You Yahoo!?
> > Make a great connection at Yahoo! Personals.
> > http://personals.yahoo.com
> >
> >
>
-
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, email:
> [EMAIL PROTECTED]
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, email:
> [EMAIL PROTECTED]
> 


__
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: Table Headings

2001-10-15 Thread Shkuro, Yuri

I do have cells like that - some have only one line of text,
some have two or more.  Since the border is for the cell,
not the  inside the cell, it works fine.

YS

-Original Message-
From: Scott Moore [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 15, 2001 2:49 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Table Headings


Have one of the cells wrap text so it grows taller than the other cells.
Then you'll see the problem.

Scott


-Original Message-----
From: Shkuro, Yuri [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 15, 2001 2:47 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Table Headings


I put the borders under each cell, and it works fine.




Yuri

-Original Message-
From: Scott Moore [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 15, 2001 2:37 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Table Headings


Karen,

I have another table related question.  I'm trying to add gridlines into the
table body by specifying:

border-width="1px" border-color="black" border-bottom-style="solid"

on the  underneath each cell.  This only works if each cell is
the same height.  Although the text is all rows start on the same line, the
blocks are only as big as they need to be, thus making the border impossible
to line up per cell, if some cells have to wrap text.

I've tried putting those attributes on the  object, but they
are ignored.  Is there a way to make gridlines work for variable height
cells?

Thanks,
Scott


-Original Message-
From: Karen Lease [mailto:[EMAIL PROTECTED]]
Sent: Sunday, October 14, 2001 11:46 AM
To: [EMAIL PROTECTED]
Subject: Re: Table Headings


Hi Scott,

It sounds like you may be putting the background on the block containing
the text. Try putting it on the table-cell itself or even on the row.

HTH,
Karen

Scott Moore wrote:
> 
> I'm creating tables for FOP that have a black background with white text
in
> the table header.  The rest of the table (the data) is inverse, with black
> characters and white background.
> 
> If the header text in a column doesn't fit on one line, it will wrap,
which
> is a good thing.  The problem is the rest of the headers that don't wrap,
> their black backgrounds stay on one line.  Therefore, the whole table
header
> looks uneven and ugly.  Here's an example, the # are the black background:
> 
> -
> -#Column#1##|#This#is#column|
> -   |2##|
> -
> - Table data| blah blah blah|
> -
> 
> Are there any settings that can automatically fix this?  I've tried using
> "padding-bottom='1em'" for the first column, and that kinda works, but
it's
> still slightly off.  The problem is I won't always know which column
> headings wrap because the fonts are user configurable.
> 
> Thanks for any help!
> Scott
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: Table Headings

2001-10-15 Thread Shkuro, Yuri

I put the borders under each cell, and it works fine.




Yuri

-Original Message-
From: Scott Moore [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 15, 2001 2:37 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Table Headings


Karen,

I have another table related question.  I'm trying to add gridlines into the
table body by specifying:

border-width="1px" border-color="black" border-bottom-style="solid"

on the  underneath each cell.  This only works if each cell is
the same height.  Although the text is all rows start on the same line, the
blocks are only as big as they need to be, thus making the border impossible
to line up per cell, if some cells have to wrap text.

I've tried putting those attributes on the  object, but they
are ignored.  Is there a way to make gridlines work for variable height
cells?

Thanks,
Scott


-Original Message-
From: Karen Lease [mailto:[EMAIL PROTECTED]]
Sent: Sunday, October 14, 2001 11:46 AM
To: [EMAIL PROTECTED]
Subject: Re: Table Headings


Hi Scott,

It sounds like you may be putting the background on the block containing
the text. Try putting it on the table-cell itself or even on the row.

HTH,
Karen

Scott Moore wrote:
> 
> I'm creating tables for FOP that have a black background with white text
in
> the table header.  The rest of the table (the data) is inverse, with black
> characters and white background.
> 
> If the header text in a column doesn't fit on one line, it will wrap,
which
> is a good thing.  The problem is the rest of the headers that don't wrap,
> their black backgrounds stay on one line.  Therefore, the whole table
header
> looks uneven and ugly.  Here's an example, the # are the black background:
> 
> -
> -#Column#1##|#This#is#column|
> -   |2##|
> -
> - Table data| blah blah blah|
> -
> 
> Are there any settings that can automatically fix this?  I've tried using
> "padding-bottom='1em'" for the first column, and that kinda works, but
it's
> still slightly off.  The problem is I won't always know which column
> headings wrap because the fonts are user configurable.
> 
> Thanks for any help!
> Scott
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: Table Layout with Page Breaks

2001-10-12 Thread Shkuro, Yuri

Corinna,
 
Indeed, keep-with-next does work when set for each row.  But you scared me
with 
the endless loop comment, so for now I would keep my stylesheets the way I
had them.
 
Somewhat related question: I am using space-before for those short tables to
leave 
some white space between them, but if the page break happens right after a
table, 
the following table on the next page will be shifted down, e.g.
 
__ page 1 starts
table 1
   <--- required gap
table 2
   <--- required gap
table 3  __ page 2 starts
   <--- unnecessary gap
table 4
 
Is there any way to avoid this gap?
 
YS

-Original Message-
From: Corinna Hischke [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 12, 2001 12:56 PM
To: [EMAIL PROTECTED]
Subject: Re: Table Layout with Page Breaks


Hi,
 
Yuri, generally the property keep-with-next should work. I tested it with
FOP 0.20.1 successfully.
 
I'm not quite sure if the hassle Darren creates by using nested tables is a
must-have.
 
You should achieve the same results by using keep-with-next for every row on
your table.
 
Single disadvantage (as in Darren's solution): if somehow a  table doesn't
fit on a single page (or Darrens row becomes bigger than a page) you might
run into an endless loop. That is a known problem and (hopefully ;)) being
worked on.
 
HTH, Corinna

- Original Message - 
From: West, Chris   
To: '[EMAIL PROTECTED]'   
Sent: Thursday, October 11, 2001 1:30 AM
Subject: Table Layout with Page Breaks


I'm using fop to generate tables that vary in length, so I need to be able
set attributes such that the table layout will accommodate page breaks.
I've tried using "keep-with-next" applied to fo:table-row and "height"
applied to fo:table (plus many others) to setup the table layout so that it
isn't truncated by a new page, but haven't had much success.  Does FOP
support this functionality?

Chris W. 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: Table Layout with Page Breaks

2001-10-11 Thread Shkuro, Yuri

I think what Chris was asking is what needs to be done to make sure
the table that doesn't fit on a page is started from the next page.
I have a similar need.  So far I just used table-header to at least
make sure that even if the table crosses the page, at least the header
will be repeated, but since my tables usually have only 5-6 rows, 
I would prefer for it to start from the next page if it can't fit on
the previous page.  

Wouldn't break-before="page" start EACH table from a new page?  This
is not what I would want.  keep-with-next didn't work for me either.

YS

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 11, 2001 3:10 PM
To: [EMAIL PROTECTED]
Subject: Re: Table Layout with Page Breaks



Make sure your table is in the xsl-region-body and not in the
xsl-region-before or xsl-region-after.  I have tables that go on for many
pages without problems.

You can then use the xsl-region-before for table headers at the top of each
page.  If you start your tables with the break-before="page" attribute you
will start a new page for each table.  So you could have a 100 row table
that goes across 3 pages, a 2 row table on 1 page then a 50 row table on 2
pages if that's what your wanting.

John



 

fop-dev-return-10770-jthaemlitz=oreillyauto.com@XML.

APACHE.ORG
To: "'[EMAIL PROTECTED]'"
 
<[EMAIL PROTECTED]> 
10/10/01 06:30 PM
cc:   
Please respond to fop-dev
Subject: Table Layout with Page Breaks
 

 





I'm using fop to generate tables that vary in length, so I need to be able
set attributes such that the table layout will accommodate page breaks.
I've tried using "keep-with-next" applied to fo:table-row and "height"
applied to fo:table (plus many others) to setup the table layout so that it
isn't truncated by a new page, but haven't had much success.  Does FOP
support this functionality?


Chris W.











-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: FOP in WebSphere and some general notes (Was: Re: Using FOP in Servlet)

2001-10-05 Thread Shkuro, Yuri

I totally agree with the suggestion to get rid of as much extra
libraries as possible.  Our infrastructore guys were very
perplexed when I told them that I am going to use FOP in my
project, and, by the way, I need those five extra jars in the
app server class path.  I don't know how much avalon framework
is integrated into FOP, but with respect to logkit - logging
is a simple API, and since FOP already supports pluggable
loggers, why not indeed make those loggers API driven, instead
of logkit dependent?

I was able to use FOP without including jimi.jar, but batik is
required even though I don't use SVG.  Why is that?  Can't it be
decoupled somehow and only loaded when SVG is used?

YS

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 05, 2001 8:49 AM
To: [EMAIL PROTECTED]
Subject: FOP in WebSphere and some general notes (Was: Re: Using FOP in
Servlet)




Karen Lease wrote:
> Configuration.put("baseDir", SOMEURLSTRING);

Thanks. I meanwhile figured it out that i could use
SOMEURLSTRING="file:"+xslFileName

Some other notes on FOP 0.20.2 in general and using in in an IBM
WebSphere Server in particular (including problems actually caused
by Batik):
- IBM has their own Logging mechanism (though it's primitive). Using
  LogKit is of no real use for me, it just forces me to put logkit.jar
  in the classpath which noticable increases startup time
  (invconvenient in development only, but i *am* developing...). Could
  you use an lightweight interface which belongs to a FOP package, and
  an default implementation which dispates to an LogKit logger?
  Something like the ErrorListener class in JAXP. I could then provide
  my own implementation to the interface without having to pull in the
  whole LogKit. This would also make for an much better separation of
  the libraries, there would be just one class in FOP which uses
  LogKit stuff in the delegation and setup routines.
- Something similar goes for the avalon framework. I thought i could
  avoid putting the jar in the classpath by not using the Driver class,
  but it still goes in by a remarkably twisted way: somewhere during
  SVG rendering in Batik a batik.bridge.BridgeContext is created, which
  quite unnecessarily creates a (Batik) DocumentLoader (there is no
  document because FOP gets the XML already as SAX event stream), which
  in turn gets a XML Parser name from the SVGUserAgent supplied by FOP
  which gets it from the fop.apps.Driver class. While the primary fault
  is in Batik which should create stuff more lazily (you may forward
  this complaint!), i don't think the fop.apps.Driver should act both
  as central repository for configuration settings and be an Avalon
  loggable at the same time. In fact i'd like to have an interface to
  FOP which resembles slightly more the XSLT TransformerFactory/
  Transformer interfaces, with setting parameters using a Parameters
  object like Java Mail mixed in. The framework stuff including setting
  up a LogKit logger and and all that could be build around that. If
  this catches your curiosity, ask me to write up a more complete
  specification.
- There is a unfortunate problem with Batik and the IBM class loaders.
  In Websphere, there is an "ApplicationServer", a JVM running in its
  own OS process, which can contain several "WebApps". Each WebApp may
  have its own classpath settings. At first i added batik.jar (and all
  other jars) to the WebApp specific classpath. Several Batik classes
  have static class variables which register some stuff in the AWT run
  time at class load time. If there is more than one WebAbb using
  Batik, directly or indirectly, the first WebApp has no problems, but
  the WebApp coming second gets errors roughly like "instance  of
   exists". I got around this by adding the jars to the
  ApplicationServer classpath, where they really belong  (but this is
  awkward without permission to mangle the server startup files).

Some minor points:
- In fop.apps.Driver, the _areaTree variable and related imports and
  statements appear to be defunct and can probably be deleted.
- FOP gets a null pointer exception if there is no default namespace
  and an element without a namespace prefix slipped into the input.
  This is because in fop/fo/FOTreeBuilder.java Line 218:
HashMap table = (HashMap)fobjTable.get(uri);
fobjMaker = (FObj.Maker)table.get(localName);
  table is null. I believe this also happens always if the namespace
  URI is not recognized.
- The PixelToMM factor (0.35277...) is repeated remarkably often
  in the source.

Regards
J. Pietschmann




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: table questions (column wiidths)

2001-10-02 Thread Shkuro, Yuri

Re #3 - yes, it is.  FOP doesn't care how you create the xsl:fo
document, if it happens to be via XSLT, so be it.  Just make sure
to use the same xsl:for-each for the actual cell content.

Since you would normally want to define some captions for the
dynamic columns, and the captions might be coming from the source
XML, you can iterate over those co create both fo:table-column
elements and later fo:table-cell for headers.

Don't know about #1 and #2.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 02, 2001 12:46 PM
To: [EMAIL PROTECTED]
Subject: table questions (column wiidths)


Folks:

1)  Can I use a percentage for the column width?  For example:



2)  Is the 'auto' table layout implemented yet?

3)  Is it possible to dynamically declare my table columns using a
for-each?  For example:


 


Thanks in advance.

-Lou


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: RE: Generating PDF on Fly

2001-09-24 Thread Shkuro, Yuri

Don't know for sure, but with 0.19 I had to call
driver.render() and driver.format(), with 0.20 I 
don't have to (actually I cannot call them).

-Original Message-
From: MEMMADI Said [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 24, 2001 4:18 AM
To: [EMAIL PROTECTED]
Subject: Re: RE: Generating PDF on Fly


Hi,
What are changes in FOP API 0.20.1 exactly  ?

Thanks in adavance ?

 Messages d´origine 
De: "Shkuro, Yuri" <[EMAIL PROTECTED]>
Date: vendredi 21 septembre  2001 16:57
Objet: RE: Generating PDF on Fly

> Yes.  See attached JSP.  Without a parameter it reads
> static XML file and displays it in HTML format, with
> 'fo' parameter it reads the .fo file and displays PDF,
> and also has a link to display static XML as PDF.  It's
> easy to modify this to read external XML file and output
> PDF.  It used to work with FOP 0.19 - you may need to tweak
> it a little for FOP 0.20 due to API changes (namely, comment
> out driver.render() and driver.format()).
> 
> YS
> 
> -Original Message-
> From: Semprini Davide [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 21, 2001 10:34 AM
> To: fop-dev
> Subject: Generating PDF on Fly
> 
> 
> Hi,
> 
> I have a question:
> 
> Is possible to generate and VISUALIZE
> with a common Browser with Acrobat Reader plug-in
> a PDF using a JSP that take in input a Dynamic XML?
> 
> Tanks!
> 
> D.Semprini
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
> 
> 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: FOP WARNING

2001-09-24 Thread Shkuro, Yuri

Two problem with this approach.  First, you are using a lot of memory to
store
intermediate XML result in a string buffer.  Second, you have to parse that
XML
again (FOP will do it for you, but it takes time).  A better solution, as I
already
said before, is to register FOP as a receiver of SAX events fired by XALAN
on the first transformation - this was you eliminate both problems and do
all
your work in one pass.  Just create a Transformer from the stylesheet and do

 // 3. Create FOP driver and set rendering mode and output stream
 org.apache.fop.apps.Driver driver = new org.apache.fop.apps.Driver();
 driver.setRenderer(driver.RENDER_PDF);
 driver.setOutputStream(  );

 // 4. Create SAXResult based on FOP Driver content handler which 
 // will accept SAX events and build FOP tree
 javax.xml.transform.sax.SAXResult saxResult =
   new javax.xml.transform.sax.SAXResult( driver.getContentHandler() );

 // 5. Use the Transformer to transform an XML Source and send the output 
 // to a Result object.
 //Implicitely it will create the FOP tree by firing SAX events
 transformer.transform( , saxResult );


YS
-Original Message-
From: Semprini Davide [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 24, 2001 9:42 AM
To: [EMAIL PROTECTED]
Subject: Re: FOP WARNING


Okay,

The example that I give is only to explain
that you can perform the PDF in two distinc phase
1) perform a trasformation 
2) use driver

You can use the "tranform method" 
with input like Dynamic xml (Dom Document) or urlXML  
and getting out a fo (Dom Document) or Writer object
YOU HAVE A LOT OF TRANSFORM TO USE!!
YOU HAVE TO SEE THE APIDOC FOR THE
COMPLETE DOCUMENTATION

For example in my project I use
xalan transform and with some
conversion I use the Fop driver
and my XML is dynamic.
WITH Transformer XALAN: 
StringWriter SstringWriter = new StringWriter();
/* this is the fo file */
 StreamResult SstreamResult = new StreamResult(SstringWriter);

transformer.transform(SstreamSourceXML, SstreamResult)

/* convert the fo file in a right format for driver
 ByteArrayOutputStream outPDF = new ByteArrayOutputStream();
 SResult = SstringWriter.toString();   
 ByteArrayInputStream str = new ByteArrayInputStream(SResult.getBytes());

 Driver driver = new Driver(new InputSource(str), outPDF);


Is this performance? I think yes!!

Bye
  

Amit wrote:

Looking at your code I am guessing that you wrote the fo file out to the
filesystem and then used the driver to convert it to PDF...how is
performance on that? 
Instead of writing the file out to the file system did you try converting
into some sorta stream and use the driver?? 
thanks for your help 
Amit 
Semprini Davide wrote: 
Hi, 
I have had the same problem 
Nobody give me a response! 
This code in FOP Home page don't work (for me!) ! 
Driver driver = new Driver();  driver.setRenderer(Driver.RENDER_PDF);
InputHandler inputHandler = new XSLTInputHandler(xmlFile, xslFile);
XMLReader parser = inputHandler.getParser();  driver.setOutputStream(new
FileOutputStream(outFile));  driver.render(parser,
inputHandler.getInputSource());

I have solved the problem using 2 phase: 
1) generate the transformation using XSLTrasform, Xalan1Transform etc...
(you can choose) 
code: 
XSLTransform traXSLT = new XSLTransform(); 
traXSLT.transform(urlXML, urlXSL, urlFoFile); 
You can choose 4 transform type (see the api documentation) 
2) Apply the result at the driver 
FileInputStream file = new FileInputStream(urlFoFile); 
response.setContentType("application/pdf"); 
Driver driver = new Driver(new InputSource(file), out); 
driver.setRenderer(Driver.RENDER_PDF); 
driver.run(); 
byte[] content = out.toByteArray(); 
response.setContentLength(content.length); 
response.getOutputStream().write(content); 
response.getOutputStream().flush(); 
THIS CODE WORK FINE!!! 
Bye 
  
  
Amit wrote: 
I am trying to generate PDFs using FOP-0.20.1. The input files are xmland
xsl filesI am using JRun3.0 with java1.2.2Here is the error I getWARNING:
Unknown formatting object ^rootAnybody any
ideas?-T
o unsubscribe, e-mail: [EMAIL PROTECTED] additional
commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: Generating PDF on Fly

2001-09-21 Thread Shkuro, Yuri

Yes.  See attached JSP.  Without a parameter it reads
static XML file and displays it in HTML format, with
'fo' parameter it reads the .fo file and displays PDF,
and also has a link to display static XML as PDF.  It's
easy to modify this to read external XML file and output
PDF.  It used to work with FOP 0.19 - you may need to tweak
it a little for FOP 0.20 due to API changes (namely, comment
out driver.render() and driver.format()).

YS

-Original Message-
From: Semprini Davide [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 21, 2001 10:34 AM
To: fop-dev
Subject: Generating PDF on Fly


Hi,

I have a question:

Is possible to generate and VISUALIZE
with a common Browser with Acrobat Reader plug-in
a PDF using a JSP that take in input a Dynamic XML?

Tanks!

D.Semprini




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]


 equity.jsp

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]


RE: Does render(dom) actually work?

2001-09-19 Thread Shkuro, Yuri

Matt,

  Why don't you do it all in one pass?  I have a servlet, that calls
some bean to get XML document in a DOM format (actually JDOM), then
registers fop driver as receiver of SAX events and runs XSLT on the
JDOM tree.

// 1. Generate XML tree
Document xmlSummary = DataLoader.getSummary();

// 2. Get stylesheet transformer
Transformer transformer = transformerFactory.getTransformer(
 );

// 3. Create FOP driver and set rendering mode and output stream
org.apache.fop.apps.Driver driver = new
org.apache.fop.apps.Driver();
driver.setRenderer(driver.RENDER_PDF);
driver.setOutputStream( out );

// 4. Create SAXResult based on FOP Driver content handler which
will accept 
// SAX events and build FOP tree
javax.xml.transform.sax.SAXResult saxResult =
new javax.xml.transform.sax.SAXResult(
driver.getContentHandler() );

// 5. Use the Transformer to transform an XML Source and send
the output 
// to a Result object.
// Implicitely it will create the FOP tree by firing SAX events
transformer.transform( new org.jdom.transform.JDOMSource( xml ),
saxResult );

YS

-Original Message-
From: Savino, Matt C [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 19, 2001 4:33 PM
To: '[EMAIL PROTECTED]'
Subject: Does render(dom) actually work?


Hello everyone. By any chance can someone point me to some example code
which uses render(dom)?  No matter what combination of driver methods or Fop
versions (.17,.19,.20.1) I use I seem to get the same error:

building formatting object tree
setting up fonts
java.lang.NullPointerException
at java.util.Hashtable.get(Hashtable.java:320)
at
org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:191)
at
org.apache.fop.tools.DocumentReader.parse(DocumentReader.java:444)
at org.apache.fop.apps.Driver.render(Driver.java:449)
at FOtoPDF.applyFop(FOtoPDF.java:83)
at FOtoPDF.main(FOtoPDF.java:24)

Here is the source I'm using under v.0.20.1:
  org.apache.fop.apps.Driver driver = new org.apache.fop.apps.Driver();
  driver.setRenderer(org.apache.fop.apps.Driver.RENDER_PDF);
  driver.setOutputStream(new FileOutputStream(pdfFilename));
  driver.setupDefaultMappings() ;
  driver.addElementMapping("org.apache.fop.fo.StandardElementMapping");
  driver.addElementMapping("org.apache.fop.svg.SVGElementMapping");
 
driver.addElementMapping("org.apache.fop.extensions.ExtensionElementMapping"
);
  driver.render(dom);

I have tried it with and without any of the mapping methods.

I am building the Dom object from a file. The sax input handler created from
the same file works fine in render(parser, inputSource). I have read through
the dev archives and found a few suggestions but none helped. Is there some
configuration I'm missing? Or did this "break a long time ago" as someone
suggested in the archives?

I am hoping to use FOP in a major production app, but if I can't solve this
I may not be able to. I am currently receiving a DOM object (a small report)
from some database access classes. I then perform an XSLT transform which
outputs my FO input as another DOM object. I suppose I could pipe the output
of that to SAX? I'd really rather not have to do anything klugy like
serialize it to a stream and then feed it in as SAX. But I'll consider
anything that doesn't cause too much of a performace hit. We definitely
don't want to have temp files sitting around, for a host of reasons.

Thank you very much for your help.

Matt Savino







-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




table-header problem

2001-09-17 Thread Shkuro, Yuri

Hi,

  I am using FOP 0.20.1 CVS build of 9/17.  I have two tables in the
document
with fo:table-header defined for each, and the header contains three lines
of text
in some columns, something like this:


  

  Exercisable 


  Exercisable 
  Beginning 
  05/2002 

  


When the first table is longer than one page, its header is repeated on the
second 
page and the second table renders fine - as expected.  However, when the
first table is just as hign as to fit on the first page but push the second
table
on the second page, the header of the second page only displays the last
line of
text.  Is this a bug?

  I attach the .fo file - it actually has six tables, but the problem is
with the
last two.  If the table elements are changed from



to



then the first of the last two tables wraps to the second page and the last
table shows correctly - sort of tells me that my stylesheet is correct.

I would appreciate any advice on this.  Thanks in advance,

YS.

P.S. Also, if someone could tell me how to enforce valign="bottom" in the
first
cell of the example above?



 test-output.zip

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]