You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Clay Leeds <cl...@medata.com> on 2003/05/21 18:05:47 UTC

fop-0.20.5rc3 alignment bug (was: Re: PMC report to the board.)

I figured this bug is getting more and more interesting so I changed the 
Subject. I guess since this is the fop-dev list, it doesn't matter as 
much that fop-0.20.5rc3 hasn't been announced (although I don't 
understand why it matters--my thought is the more time between 
announcement & release of 0.20.5, the more chances 'little' bugs like 
this one'll get noticed/fixed).

On 5/21/2003 1:25 AM, Thomas Sporbeck wrote:
>>Not so strange. There is a PrintRenderer the PDFRenderer extends, and
> an AbstractRenderer the > 
>>AWTRenderer extends. Most likely the PrintRenderer was adapted to a
> fix.
> 
> In my test I used the AWT-Preview and pdf-Output.
> Rendering to pdf has other results than using the AWTRenderer (pdf seems
> to be ok, but text-align = "right" seems to be buggy in comparison to
> text-align = "end" which seems to work correctly).

Ahh! That's interesting. I'll try changing my code to see if that helps. 
BTW, is this in general true: that text-align values of "start/end" have 
a greater chance for support?

> The fist time a page > page1 is shown in the AWT-Preview, the rendering
> is ok. If you go to the next page and then back, the rendering is no
> longer correct, so I suppose that there is really something done to
> often.

That's what I noticed. However, page1 renders with that weirdness the 
first time. Then, if you click the [>] and [<] buttons to go back and 
forth, the rendering of text-align="right" actually migrates further and 
further to the right until it goes off the page. For all I know, it 
keeps going after it goes off the page.
-- 
Clay Leeds - cleeds@medata.com
Web Developer - Medata, Inc. - http://www.medata.com
PGP Public Key: https://mail.medata.com/pgp/cleeds.asc


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: fop-0.20.5rc3 alignment bug

Posted by Clay Leeds <cl...@medata.com>.
On 5/21/2003 3:21 PM, Christian Geisert wrote:
> I'll start working on 0.20.5rc3a now (the 'a' to avoid confusion
> as there were already several hundreds of downloads of rc3)
> 
> Christian

Danke! I don't know how much work is involved in generating one of these 
beasties, but I appreciate it. But... why not just call it 0.20.5rc4?
-- 
Clay Leeds - cleeds@medata.com
Web Developer - Medata, Inc. - http://www.medata.com
PGP Public Key: https://mail.medata.com/pgp/cleeds.asc


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: fop-0.20.5rc3 alignment bug

Posted by Christian Geisert <ch...@isu-gmbh.de>.
Clay Leeds schrieb:

[..]

> ...So, does this mean we're going to see a new RC (i.e., fop-0.20.5rc4) 
> with this little bug fixed before 0.20.5? Or will we wait 'til 0.20.5 

I'll start working on 0.20.5rc3a now (the 'a' to avoid confusion
as there were already several hundreds of downloads of rc3)

Christian


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: fop-0.20.5rc3 alignment bug

Posted by Clay Leeds <cl...@medata.com>.
On 5/21/2003 12:32 PM, J.Pietschmann wrote:
> The part whith the alignment code was missing an important line:
>            aligned = true.
> Because for PDF rendering the code is called only once, I didn't
> notice.

...So, does this mean we're going to see a new RC (i.e., fop-0.20.5rc4) 
with this little bug fixed before 0.20.5? Or will we wait 'til 0.20.5 
before users can see this fixed in a "publicly" available, non-CVS 
release? Call me crazy, but for reasons similar to not being able to do 
much testing on 0.20.5rc2 (primarily bug #17472), I anticipate a rough 
time testing 0.20.5rc3 ("Besides that Mrs. Lincoln, how'd you like the 
play?").
-- 
Clay Leeds - cleeds@medata.com
Web Developer - Medata, Inc. - http://www.medata.com
PGP Public Key: https://mail.medata.com/pgp/cleeds.asc


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: fop-0.20.5rc3 alignment bug

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Clay Leeds wrote:
> That's what I noticed. However, page1 renders with that weirdness the 
> first time. Then, if you click the [>] and [<] buttons to go back and 
> forth, the rendering of text-align="right" actually migrates further and 
> further to the right until it goes off the page. For all I know, it 
> keeps going after it goes off the page.

Hehe, it's always fun to watch people guessing wildly.
Take a peek into the code, more precisly into LineArea.java:
     public void render(Renderer renderer) {
         if (pendingWidth > 0) {
             // tell people they hit a  .... err .... deficiency
             MessageHandler.error("Areas pending, text probably lost in line"
                                  + getLineText());
         }
         if (hasPageNumbers) {
             // get page numbers ... snipped
         }
         if (!aligned) {
             // align text
             int padding = 0;
             switch (textAlign) {
             case TextAlign.START:      // left
                 padding = this.getContentWidth() - finalWidth;
                 endIndent += padding;
              ... rest snipped ...
         }
         renderer.renderLineArea(this);
     }
The part whith the alignment code was missing an important line:
            aligned = true.
Because for PDF rendering the code is called only once, I didn't
notice.

J.Pietschmann


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org