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 Michail Bikoulis <Mi...@ementor.no> on 2001/07/16 12:44:39 UTC

keep.fo example

Hello,

I ran the keep.fo example with fop 0.19.0 in order to gain an understanding
on how the keep properties work in table rows. In the first page of the
resulting pdf file the table rows appear in the "region-after" section of
the page, below the page-number.

The way I understand the keep.fo code, the table contents should have been
in the "region-body", above the "region-after" that contains the
page-number. Is there a bug here?

Thanks,

Mike

FOP in a servlet

Posted by VIRUEGA Pierre <pi...@sofrecom.com>.
Hello,
I need some help about how to embed FOP in a servlet.
I know there is an example on the FOP site but it is only with one parameter,
the same as:
Fop foo.fo foo.pdf

and what I want to do is similar to:
Fop -xml foo.xml -xsl foo.fo foo.pdf

I found the following code on the FOP FAQ as an example =

   response.setContentType("application/pdf");
   Driver d = new Driver();
   // this doesn't compile
   //Driver.setRenderer(RENDER_PDF);

   InputHandler inputHandler = new XSLTInputHandler(xmlFile, xslFile);
   XMLReader parser = inputHandler.getParser(); // error at getParser
   d.buildFOTree(parser, inputHandler.getInputSource());
   d.format();
   d.setOutputStream(response.getOutputStream());
   d.render();

But it failed  with the message =
java.lang.NullPointerException
        at org.apache.fop.apps.InputHandler.createParser(InputHandler.java:58)
        at
org.apache.fop.apps.XSLTInputHandler.getParser(XSLTInputHandler.java:117)
        at NewFopServlet.buildPDFDoc(NewFopServlet.java:157)
        at NewFopServlet.doGet(NewFopServlet.java:96)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)

Does anyone has solved the same problem?
Thks
Pierre

**************************************************************************************************
This e-mail contains confidential information or information belonging
to Sofrecom and is intended solely for the addressees.
The unauthorised disclosure, use, dissemination or copying (either whole
or partial) of this e-mail, or any information it contains, is prohibited.
E-mails are susceptible to alteration and their integrity cannot be guaranteed.
Sofrecom shall not be liable for this e-mail if modified or falsified.
If you are not the intended recipient of this e-mail, please delete it
 immediately from your system and notify the sender of the wrong delivery
and the mail deletion.

** eSafe scanned this email for viruses, vandals and malicious content **
**************************************************************************************************

Re: keep.fo example

Posted by Keiron Liddle <ke...@aftexsw.com>.
There is no bug with the placement of the table inside the region-body.

If you put text in place of the table you will notice that the region-body
overlaps where the page number is by about 2.5 lines.

It is simply the way that the page layout is setup.


On Mon, 16 Jul 2001 12:44:39 Michail Bikoulis wrote:
> Hello,
> 
> I ran the keep.fo example with fop 0.19.0 in order to gain an
> understanding
> on how the keep properties work in table rows. In the first page of the
> resulting pdf file the table rows appear in the "region-after" section of
> the page, below the page-number.
> 
> The way I understand the keep.fo code, the table contents should have
> been
> in the "region-body", above the "region-after" that contains the
> page-number. Is there a bug here?
> 
> Thanks,
> 
> Mike
>