Andreas L. Delmelle wrote:
>> -----Original Message-----
>> From: Andreas L. Delmelle [mailto:[EMAIL PROTECTED]
>>> -----Original Message-----
>>> From: Richard Mixon (qwest) [mailto:[EMAIL PROTECTED]
>> 
>>> I am having trouble getting a cell to span multiple columns. I have
>>> looked at the examples and read/re-read the specs, but no joy. Any
>>> help is appreciated - I have seen several posts affirming that this
>>> feature is supported, so its obviously a "user error". Any help is
>>> appreciated. 
>> 
> <snip />
>> Can you try if moving the fo:region-body definition a few lines up
>> solves your problem? 
>> 
> 
> Nope, just tried with both FOP versions, and your FO code should
> definitely work... What version is it that you're using? 
> 
> 
> Sorry,
> Andreas

Andreas,

Thank you for checking this out. Here's what this helped me determine:

1) Even after moving the fo:region-body up two lines it still does not
work. I am using a build of FOP from 2004/05/29. IIRC, I had to move to
this quite a while back for JDK reasons.

2) Yes, if I run this against FOP 0.20.5 it works fine. My table borders
also work fine.

So, its either my version of FOP or it could be the way I am setting FOP
up in my servlet that does the PDF processing.

Before trying to build a new version of FOP CVS HEAD (I believe I tried
recently and had problems with Sun JDK 1.5 sp1) can anyone see problems
in my servlet code? Below are the relevant parts.

I have also attached the PDF I get as output - but I am not sure if it
will make it through the list processing, even though its tiny.

Thank you once again - Richard


<!-- BEGIN FROM servlet ini method, run once at startup -->
        logger = new ConsoleLogger(ConsoleLogger.LEVEL_DEBUG);
        transFactory = TransformerFactory.newInstance();
        imageURLProtocol = getInitParameter("imageURLProtocol");
        String httpBaseDir = ".";
        String baseDir =
this.getServletContext().getRealPath(httpBaseDir);
        userAgent = new FOUserAgent();
        userAgent.setBaseURL(imageURLProtocol+baseDir);
<!-- END   FROM servlet ini method, run once at startup -->

<!-- BEGIN FROM servlet doGet method, run once per file I process -->
        String contentFO = (String)session.getAttribute(attrName);
        String title;
        String wrappedContent = contentFO.trim();

        StringReader sr = new StringReader( wrappedContent );
        Source inSrc = new StreamSource(sr);
        String pdfOutName = null;
        FileOutputStream pdfOut = null;

        try {
            Transformer transformer = transFactory.newTransformer();
            pdfOutName =
FileUtil.getUserOutputFileName(null,".pdf",request);
            File tempDir =
(File)request.getSession().getServletContext().getAttribute("javax.servl
et.context.tempdir");
            File pdfOutFile = new File(
tempDir.getPath()+File.separator+pdfOutName );
            pdfOutFile.createNewFile();
            pdfOut = new FileOutputStream( pdfOutFile );
            Driver driver = new Driver();
            driver.setRenderer(Driver.RENDER_PDF);
            driver.setUserAgent(userAgent);
            driver.initialize();
            driver.setOutputStream(pdfOut);

            //Make sure the XSL transformation's result is piped through
to FOP
            Result res = new SAXResult(driver.getContentHandler());

            //Start the transformation and rendering process
            transformer.transform(inSrc, res);
            driver.reset();
            pdfOut.flush();
            pdfOut.close();
        } catch (Exception ex) {
            ex.printStackTrace();
            throw new ServletException(ex);
        } finally {
            File pdfFile = new File( pdfOutName );
        }
<!-- END   FROM servlet doGet method, run once per file I process -->

Attachment: lir.pdf
Description: Adobe PDF document

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

Reply via email to