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 Olivier Rossel <ol...@anyware-tech.com> on 2002/03/09 18:18:55 UTC

Table inside a cell.

I have a table with two cells per row.
The first cell is for text (rather big), and the second row is for a table.

This table has three columns, each with both borders black and solid.
But this table is small and the end of the table corresponds to 
(something like) the
half of the text.

My problem is that the borders of each columns of that table stops at 
the middle of the cell.
I would have prefered the columns borders to be displayed at the whole cell.

Here is a little scheme:


--------------------------------
The text         |A1   |1       |     |
big                   |         |2       | *  |
big                   | -----|-----|----|
big                   | A2  | 1      |*   |
big                   |         | 2      |** |
big                   |----------------
big                   |                          |
End of text.   |                          |
--------------------------------

I would have prefered something llike:

--------------------------------
The text         |A1   |1       |     |
big                   |         |2       | *  |
big                   | -----|-----|----|
big                   | A2  | 1      |*   |
big                   |         | 2      |** |
big                   |         |         |      |
big                   |         |         |      |                      
End of text.   |         |         |      |
--------------------------------

(this ascii art is ok in Mozilla, hope it will be ok for other mail 
readers too :-)



Re: Table inside a cell.

Posted by "Peter B. West" <pb...@powerup.com.au>.
Olivier,

At a guess, you have your mozilla
Edit>Preferences>Mail & Newsgroups>Send Format "Convert the message to 
plain text" option set, and you left your message composer in the 
default "Variable Width", a condition to which it will stubbornly return 
itself at every opportunity.  ASCII art can be done as long as you keep 
an eye on the font at all times.  I'm using a nightly build though, so YMMV.

Peter

Olivier Rossel wrote:

> Well, for Ascii art, Vim is probably better :-)




problems with fo:external-graphic

Posted by Michael Schifferdecker <mi...@gmx.de>.
Hello all,

I have a problem with fo:external-graphic.

I use a Servlet to do PDF generation together with a test style sheet which
produces FO-code in which the following fo:external-graphic is contained:

...
<fo:external-graphic src="file:///c:/xml_space/lohnsteuer/fd_logo.gif"
height="0.58cm" width="2.71cm"/>
...

When I use this under jBuilder with integrated Apache Tomcat 3.2 to include
the GIF fd_logo.gif into the PDF everything works fine.

But: after the whole application is distributed to my stand alone Tomcat 4.0
server problems occur (see following exception).
The error occurs with FOP 0.20.2RC and with 0.20.3 also.

What's the cause for this?
What alternatives do I have?

Best regards, Michael

(exception information follows)

exception root cause...
  java.lang.NoClassDefFoundError: org/w3c/dom/svg/SVGDocument

complete exception as follows...

type Exception report
message Internal Server Error

description The server encountered an internal error (Internal Server Error)
that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Servlet execution threw an exception
	at
...
...
...
...
root cause

java.lang.NoClassDefFoundError: org/w3c/dom/svg/SVGDocument
	at
org.apache.fop.image.analyser.ImageReaderFactory.Make(ImageReaderFactory.jav
a:45)
	at org.apache.fop.image.FopImageFactory.Make(FopImageFactory.java:100)
	at org.apache.fop.fo.flow.ExternalGraphic.layout(ExternalGraphic.java:125)
	at org.apache.fop.fo.flow.Block.layout(Block.java:259)
	at org.apache.fop.fo.flow.TableCell.layout(TableCell.java:263)
	at org.apache.fop.fo.flow.TableRow.layout(TableRow.java:344)
	at org.apache.fop.fo.flow.TableBody.layout(TableBody.java:172)
	at org.apache.fop.fo.flow.Table.layout(Table.java:226)
	at org.apache.fop.fo.flow.Block.layout(Block.java:259)
	at org.apache.fop.fo.flow.StaticContent.layout(StaticContent.java:78)
	at
org.apache.fop.fo.pagination.PageSequence.layoutStaticContent(PageSequence.j
ava:413)
	at
org.apache.fop.fo.pagination.PageSequence.formatStaticContent(PageSequence.j
ava:362)
	at org.apache.fop.fo.pagination.PageSequence.format(PageSequence.java:302)
	at org.apache.fop.apps.StreamRenderer.render(StreamRenderer.java:191)
	at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:178)
	at org.apache.xerces.parsers.SAXParser.endElement(SAXParser.java:1398)
	at
org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValidator
.java:1007)
	at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XM
LDocumentScanner.java:1255)
	at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.
java:380)
	at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:908)
	at org.apache.fop.apps.Driver.render(Driver.java:459)
	at org.apache.fop.apps.Driver.run(Driver.java:542)
	at
formdirekt.pdfgen.POSTReceiveServlet.renderFO(POSTReceiveServlet.java:145)
	at formdirekt.pdfgen.POSTReceiveServlet.doPost(POSTReceiveServlet.java:71)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
...
...
...

exception with fop 0.20.2RC and tomcat 4.0.2 - continued

Posted by Michael Schifferdecker <mi...@gmx.de>.
Hi all,...

I still get the exception (see below) even after using a different batik.jar
when I deploy my application to a stand-alone Tomcat server (batik.jar
included in WAR file).

>>> exeption...

java.lang.NoClassDefFoundError: org/w3c/dom/svg/SVGDocument at
org.apache.fop.image.analyser.ImageReaderFactory.Make(ImageReaderFactory.jav
a:45)

... exception <<<

still in jbuilder integrated tomcat everything works fine.

my java servlet source code for the pdf generation is as follows:

  /**
   * renders an FO inputsource into a PDF file which is rendered
   * directly to the response object's OutputStream
   */
  public byte[] renderFO(String foFileStr, HttpServletResponse response)
throws ServletException {

    try {

      InputSource foFile = new InputSource(new FileInputStream(foFileStr));
      ByteArrayOutputStream out = new ByteArrayOutputStream();

      Driver driver = new Driver(foFile, out);
      driver.setRenderer(Driver.RENDER_PDF);
      driver.run();

      byte[] content = out.toByteArray();

      // this is the pdf in memory!
      return content;

    } catch (Exception ex) {
      // throw any error back to upper method...
      throw new ServletException(ex);
    }

  }

i have added the following imports to the class:

import java.util.*;
import java.io.*;
import java.net.*;

import javax.servlet.*;
import javax.servlet.http.*;

import org.xml.sax.*;

import org.apache.fop.apps.Driver;
import org.apache.fop.apps.Version;
import org.apache.xalan.xslt.*;


the following fop related archives are deployed with the war file besides
other archives:

C:\Programme\Apache Group\Fop-0.20.2\lib\avalon-framework-4.0.jar
C:\Programme\Apache Group\Fop-0.20.2\lib\batik.jar
C:\Programme\Apache Group\Fop-0.20.2\lib\logkit-1.0b4.jar
C:\Programme\Apache Group\Fop-0.20.2\lib\jimi.jar
C:\Programme\Apache Group\Fop-0.20.2\build\fop.jar
xalan and xerces: the versions of jbuilder 5 are used



for any tips... thanks in advance... any help is appreciated!

best regards, Michael

eception with fop 0.20.2RC and tomcat 4.0.2

Posted by Michael Schifferdecker <mi...@gmx.de>.
Hi all,...

perhaps someone on the list maybe able to help me...
when i deplpoy my fop servlet from jbuilder 5 enterprise to tomcat 4.0.2 in
a war file that includes all required (hope so!) the tomcat server throws
the following exception:

Apache Tomcat/4.0.2 - HTTP Status 500 - Internal Server Error

----------------------------------------------------------------------------
----

type Exception report

message Internal Server Error

description The server encountered an internal error (Internal Server Error)
that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Servlet execution threw an exception
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:269)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:190)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
	at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1012)
	at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107
)
	at java.lang.Thread.run(Thread.java:484)


root cause

java.lang.NoClassDefFoundError: org/w3c/dom/svg/SVGDocument
	at
org.apache.fop.image.analyser.ImageReaderFactory.Make(ImageReaderFactory.jav
a:45)
	at org.apache.fop.image.FopImageFactory.Make(FopImageFactory.java:100)
	at org.apache.fop.fo.flow.ExternalGraphic.layout(ExternalGraphic.java:125)
	at org.apache.fop.fo.flow.Block.layout(Block.java:259)
	at org.apache.fop.fo.flow.TableCell.layout(TableCell.java:263)
	at org.apache.fop.fo.flow.TableRow.layout(TableRow.java:344)
	at org.apache.fop.fo.flow.TableBody.layout(TableBody.java:172)
	at org.apache.fop.fo.flow.Table.layout(Table.java:226)
	at org.apache.fop.fo.flow.Block.layout(Block.java:259)
	at org.apache.fop.fo.flow.StaticContent.layout(StaticContent.java:78)
	at
org.apache.fop.fo.pagination.PageSequence.layoutStaticContent(PageSequence.j
ava:413)
	at
org.apache.fop.fo.pagination.PageSequence.formatStaticContent(PageSequence.j
ava:362)
	at org.apache.fop.fo.pagination.PageSequence.format(PageSequence.java:302)
	at org.apache.fop.apps.StreamRenderer.render(StreamRenderer.java:191)
	at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:178)
	at org.apache.xerces.parsers.SAXParser.endElement(SAXParser.java:1398)
	at
org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValidator
.java:1007)
	at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XM
LDocumentScanner.java:1255)
	at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.
java:380)
	at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:908)
	at org.apache.fop.apps.Driver.render(Driver.java:459)
	at org.apache.fop.apps.Driver.run(Driver.java:542)
	at
formdirekt.pdfgen.POSTReceiveServlet.renderFO(POSTReceiveServlet.java:145)
	at formdirekt.pdfgen.POSTReceiveServlet.doPost(POSTReceiveServlet.java:71)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:190)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
	at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1012)
	at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107
)
	at java.lang.Thread.run(Thread.java:484)



the main problem os contained in the root cause section:
"java.lang.NoClassDefFoundError: org/w3c/dom/svg/SVGDocument".

this class is part of the BATIK.JAR archive which is also included in the
deploy list for the tomcat war file.
i also added an explicit export flag to the org/w3c/dom/svg package but that
does not help.
the project runs perfectly in the development environment with the build in
tomcat 3.2 server of jbuilder.

every help is appreciated... thanks in advance.

Michael

Re: Table inside a cell.

Posted by Olivier Rossel <ol...@anyware-tech.com>.
Well, for Ascii art, Vim is probably better :-)