Place image at top of page

Michel Krämer <[email protected]>
Newsgroups gmane.text.xml.fop.user
Message-ID <[email protected]>
Hi!

I'm looking for a way to place an image at the top of the page, just like you can do it in LaTeX:

\begin{figure}[t!]
  ...
\end{figure}

If I understand it correctly, you should be able to do this with the fo:float object:

<fo:float float="before">
  ...
</fo:float>

I understand that FOP does not support the "before" value yet.

Is there a workaround to achieve the same thing? For example by placing the image absolutely or something like that?

I had a look at the code and it seems the feature is almost implemented but not fully yet. There is a BeforeFloat class that is supposed to place blocks in the before-float area, but even if I use <fo:float float="before"> this class never receives any children. The float also disappears from the output PDF.

If there is no workaround for my problem I would be very interested to implement the solution myself. I'm a Java programmer and if anyone could give me some pointers on where to start and what is missing in the current code I'd probably be able to fill the gaps.

Let me know what you think. Thank you so much!

Cheers,
Michel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.