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 Ruud Dozijn <rd...@hotmail.com> on 2010/11/23 12:34:35 UTC

images all on one line

hi,

I was looking for a way to have a number of images on the same line, without a line break.

I tried a number of methods that looked potentially OK to me, but most of them failed. Can anyone have a look at it and explain me the reason that most lines get a linebreak in the attached pdf file?

I also attached the fo file. Only the second try works as expected: the images run off the page. What is wrong with the other lines?
I use fop 0.95 and fop 1.0.

thanks, Ruud
 		 	   		  

RE: images all on one line

Posted by Ruud Dozijn <rd...@hotmail.com>.


> Date: Tue, 23 Nov 2010 13:57:49 +0100
> From: pascal.sancho@takoma.fr

> I see 2 distinct issues:
>  - spaces between pictures:
>     spaces between XSL elements are kept in rendered PDF.
>   you can easily avoid them by removing from XSL-FO code.
>   This is a normal behavior.
> 
>  - breaks at space between 2 pictures:
>     That should not occur since there is a keep-together.within-line
> condition. But there is a possible interaction with line stacking
> strategy. I cannot be more precise: my knowledge is quite limited here.

Hi Pascal,

thanks for pointing out. Indeed the indenting of the elements causes the problems. If I remove the linefeed and indenting in the cases where the line is broken, the line breaking disappears.

Now the question is, why is the indentation no problem in the second line?
And I hope someone can explain me what happens. I am still very confused.

Ruud


 		 	   		  

Re: images all on one line

Posted by Pascal Sancho <pa...@takoma.fr>.
Hi,

I see 2 distinct issues:
 - spaces between pictures:
    spaces between XSL elements are kept in rendered PDF.
  you can easily avoid them by removing from XSL-FO code.
  This is a normal behavior.

 - breaks at space between 2 pictures:
    That should not occur since there is a keep-together.within-line
condition. But there is a possible interaction with line stacking
strategy. I cannot be more precise: my knowledge is quite limited here.

Le 23/11/2010 12:34, Ruud Dozijn a écrit :
> I was looking for a way to have a number of images on the same line,
> without a line break.
> 
> I tried a number of methods that looked potentially OK to me, but most
> of them failed. Can anyone have a look at it and explain me the reason
> that most lines get a linebreak in the attached pdf file?
> 
> I also attached the fo file. Only the second try works as expected: the
> images run off the page. What is wrong with the other lines?
> I use fop 0.95 and fop 1.0.

--
Pascal

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


RE: images all on one line

Posted by Ruud Dozijn <rd...@hotmail.com>.


the relevant portionof the fo-file is

    <fo:block keep-together.within-line='always'>
        <fo:external-graphic src='url("jpgtest.jpg")'
                          width='4cm' content-width='scale-to-fit'
                          height='2cm' content-height='scale-to-fit'
                          scaling='non-uniform' />
     
.....external-graphic element repeated several times
    </fo:block>
    <fo:block>all external-graphics in inline</fo:block>
    <fo:block keep-together.within-line='always'>
      <fo:inline>
        <fo:external-graphic src='url("jpgtest.jpg")'
                          width='4cm' content-width='scale-to-fit'
                          height='2cm' content-height='scale-to-fit'
                          scaling='non-uniform' />
       
...... external-graphic element repeated several times
      </fo:inline>
    </fo:block>
    <fo:block>each external-graphic in inline</fo:block>
    <fo:block keep-together.within-line='always'>
      <fo:inline>
        <fo:external-graphic src='url("jpgtest.jpg")'
                          width='4cm' content-width='scale-to-fit'
                          height='2cm' content-height='scale-to-fit'
                          scaling='non-uniform' />
      </fo:inline>

...... inline element repeated several times
    </fo:block>
    <fo:block>each external-graphic in inline II</fo:block>
    <fo:block>
      <fo:inline keep-with-next.within-line='always'>
        <fo:external-graphic src='url("jpgtest.jpg")'
                          width='4cm' content-width='scale-to-fit'
                          height='2cm' content-height='scale-to-fit'
                          scaling='non-uniform' />
      </fo:inline>

.......inline element repeated several times
    </fo:block>

Only the second construct keeps all images on one line....