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 Wouter de Vaal <wo...@hotmail.com> on 2004/02/26 12:30:42 UTC

external-graphic and caption

Hi,

Is it possible to add a caption to an external-graphic without putting it in a table?

My goal is to have multiple graphics within a block so they will be put on one line
untill there is no more space and then the next will be shown on the next line..

Regards,
Wouter

Re: external-graphic and caption

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Wouter de Vaal wrote:
> On a related note: if I create a few fo:table withing 1 fo:block, each
> table will appears on the next line. So I was hoping for
> 
> <table><table><table>
> 
> but I get
> 
> <table>
> <table>
> <table>

Table is a block level element. Starting a table creates a new block
area, which closes any line you was filling.
The only way to put several tables side-by-side in a ordinary line is
to wrap each in a fo:inline-container. Unfortunately, FOP 0.20.5
doesn't implement inline containers. The only alternative is to nest
the tables in a bigger table spanning the page width.

> Is there a way to tweak this behaviour without using a "grand" table? So for
> example when the three tables are too big, a newline will be automatically
> be inserted like:
> 
> <table><table>
> <table>
> 
> If this could be possible, I would have exactly what I need..

Impossible or at least very complicated with FOP 0.20.5.

I suggest preprocessing the images so that the caption is part of
the bitmap.

J.Pietschmann

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


Re: external-graphic and caption

Posted by Wouter de Vaal <wo...@hotmail.com>.
> Wouter de Vaal wrote:
> > Is it possible to add a caption to an external-graphic without putting
> > it in a table?
>
> It depends on what you mean by "add a caption to an external-graphic".
>
Sorry for not being clear. I meant an image with a text underneath it. I was
wondering if this could be done without putting it in a table or block..

On a related note: if I create a few fo:table withing 1 fo:block, each
table will appears on the next line. So I was hoping for

<table><table><table>

but I get

<table>
<table>
<table>

Is there a way to tweak this behaviour without using a "grand" table? So for
example when the three tables are too big, a newline will be automatically
be inserted like:

<table><table>
<table>

If this could be possible, I would have exactly what I need..

Thanx,
Wouter

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


Re: external-graphic and caption

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Wouter de Vaal wrote:
> Is it possible to add a caption to an external-graphic without putting 
> it in a table?

It depends on what you mean by "add a caption to an external-graphic".
>  
> My goal is to have multiple graphics within a block so they will be put 
> on one line
> untill there is no more space and then the next will be shown on the 
> next line..

You can mix text and graphics in one line. Gotchas:
- You can't control vertical alignment well. Graphics alignment
  is by default "top", and can only be adjusted with vertical-align
  "sub" and "super"
- If the graphics is higher than the line height, it will overlap
  subsequent lines. FOP 0.20.5 is not able to automatically adjust
  line height, it will always use the line height specified on the
  block or implicitely derived from the font size in effect on the
  block.

J.Pietschmann



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


Solution to extra blank pages when you add page breaks

Posted by Chanaka Amarasekara <ch...@ifs.lk>.
Hi,

I found a way of solving the problem, where FOP adds extra blank pages when
you add a page break. Simple remove the break-after="page" or
break-before="page" from the fo:table or fo:table-row tag and add the
following condition to it.

BREAK-AFTER
<xsl:if test="position() != last()"><xsl:attribute
name="break-after">page</xsl:attribute></xsl:if>

BREAK-BEFORE
<xsl:if test="position() != 1"><xsl:attribute
name="break-before">page</xsl:attribute></xsl:if>.

EG:
<fo:table-row element-id="authchk_163">
   <xsl:if test="position() != last()"><xsl:attribute
name="break-after">page</xsl:attribute></xsl:if>

Regards,
Chanaka


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