[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fop-user
Subject:    Re: Using fo:block-container and tables together to format a PDF
From:       Vincent Hennebert <vincent.hennebert () anyware-tech ! com>
Date:       2007-10-26 8:40:13
Message-ID: 4721A7ED.3070704 () anyware-tech ! com
[Download RAW message or body]

Hi Joseph,

caporale wrote:
> I'm trying to convert an HTML newsletter to PDF format.  
> 
> The HTML newsletter's format is something like this:
> 
> <table border="0">
> <tr><td colspan="2">&lt;img src="headerimage.png"/&gt;</td></tr>
> <tr><td bgcolor="#696969">Side column text here</td><td>Newsletter body text
> here</td></tr>
> </table>
> 
> I started by trying to use tables in FOP, but the problem I ran into was
> that I kept getting gaps between the header image and the next table row. 
> It didn't look good.  

That shouldn't be the case. Can you post the XSL-FO snippet that results 
from the transformation of your table? That will be easier for us to 
help.

That said, your table only has 2 columns and the image spans them. So 
you could simply put the image in an fo:block and only then start the 
table.

Or do you want your image to be present on /every/ page? Then you should 
put it in an fo:region-before.


> So, I thought about using fo:block-container to position the header image
> absolutely at the top of the page and then use fo tables for the body. 
> There's a problem with that, though.  If the newsletter's body text takes up
> more than one PDF page, the fo table all gets moved to page 2 and the header
> image in the fo:block-container stays on page 1.  
> 
> Basically, I want a way to do gapless header graphics with no space between
> it and the next row, and I'd like to be able to make the body an arbitrary
> number of pages.  The header image should always be at the top of the page,
> but the body text should be able to span across as many pages as it needs.  

HTH,
Vincent

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic