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 André Rüdiger <an...@web.de> on 2006/11/23 14:14:41 UTC

Question about (and probably a bug in) AWTRenderer (fop-0.92beta)

Hello fop-users!

There are two issues for that I would highly appreciate some help:

1. I've a question about the AWTRenderer: Is it possible to monitor the
progress of the rendering process? AWTRenderer in fop-0.20.5 had a
setProgressListener() method but it looks like it didn't do anything. For
0.92beta I didn't find anything.

2. There's an issue with the page order which could be a bug. After the
rendering I'm using a loop in which I'm iterating through the rendered pages
like in the following:

    AWTRenderer renderer = new AWTRenderer();
    FOUserAgent agent = getFoUserAgent();
    
    renderer.setPreviewDialogDisplayed(false);
    renderer.setUserAgent(agent);
    agent.setRendererOverride(renderer);
    Fop fop = agent.getFactory().newFop(MimeConstants.MIME_FOP_AWT_PREVIEW,
agent);
    Result res = new SAXResult(fop.getDefaultHandler());
    
    transform(res);
    
    for (int i = 0; i < renderer.getNumberOfPages(); i++) {
        BufferedImage bi = renderer.getPageImage(i);
        [...]
    }

The problem is that when doing renderer.getPageImage(i) the last page is
retrieved first although the order of the other pages is coorect:
    i = 0                  - last page
    i = 1                  - 1st page
    i = 2                  - 2nd page
    i = getNumberOfPages() - second last page

I don't have this problem when using other renderers like the PDF-renderer.
Is this a bug or did I miss something?

Thanks in advance for reading and your help!

Cheers,
André


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Question about (and probably a bug in) AWTRenderer (fop-0.92beta)

Posted by "J.Pietschmann" <j3...@yahoo.de>.
André Rüdiger wrote:
> 1. I've a question about the AWTRenderer: Is it possible to monitor the
> progress of the rendering process? AWTRenderer in fop-0.20.5 had a
> setProgressListener() method but it looks like it didn't do anything. For
> 0.92beta I didn't find anything.

In 0.20.5, the progress listener monitored when a new page was started.
In 0.92ff, the layout algorithm has changed. Pages are no longer filed
one after another, and it is quite difficult, technically, to define
what "progress" should mean.

> 2. There's an issue with the page order which could be a bug.

It looks like a bug indeed.

J.Pietschmann.

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org