xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominik Stadler <dominik.stad...@dynatrace.com>
Subject keep-with-previous and page break
Date Mon, 05 Jul 2010 12:29:53 GMT
Hi,

I am creating automated PDF documents using FOP 0.95. I tried to use keep-with-previous="always"
to keep related content near each other when rendering multi-page documents.

FOP renders as much related content as possible, but does not overflow the rest to the next
page, but simply ignores it, so if I have 10 images, where only the first 3 fit on the page,
the other 7 are simply not visible in the PDF.

Is this the intended behaviour? Is there another way to tell FOP that the relation is there,
but it still should do page breaks if the page is filled?

As I do not know how much content fits on a page, I would not like to start setting/unsetting
keep-with-previous on my own, but would expect the renderer to do page breaks if keeping on
one page is not possible.

The XSL-FO looks roughly like this, all elements use "keep-with-previous" to not have page-breaks
between the heading and the images.

<fo:block>
  <fo:block margin-bottom="18pt" />
  <fo:block id="22766706" font-size="12pt" font-weight="bold">Split</fo:block>
</fo:block>
<fo:block>
  <fo:block text-align="center" keep-with-previous="always">
    <fo:block text-align="center" keep-with-previous="always">
      <fo:block text-align="center" keep-with-previous="always">
        <fo:block margin-top="4mm" keep-with-previous="always">
        </fo:block>
      </fo:block>
      <fo:block text-align="center" keep-with-previous="always">
      </fo:block>
      <fo:block text-align="center" keep-with-previous="always">
        <fo:block keep-with-previous="auto">
          <fo:external-graphic src="url(file:///C:\data\trunk\jloadtrace\client\reports\images\report7247282025380767966.png)"
content-width="50%" />
        </fo:block>
      </fo:block>
    </fo:block>
    <fo:block text-align="center" keep-with-previous="always">
      <fo:block text-align="center" keep-with-previous="always">
        <fo:block margin-top="4mm" keep-with-previous="always">
        </fo:block>
      </fo:block>
      <fo:block text-align="center" keep-with-previous="always">
      </fo:block>
      <fo:block text-align="center" keep-with-previous="always">
        <fo:block keep-with-previous="auto">
          <fo:external-graphic src="url(file:///C:\data\trunk\jloadtrace\client\reports\images\report4397309587986933658.png)"
content-width="50%" />
        </fo:block>
      </fo:block>
    </fo:block>
    <fo:block text-align="center" keep-with-previous="always">
      <fo:block text-align="center" keep-with-previous="always">
        <fo:block margin-top="4mm" keep-with-previous="always">
        </fo:block>
      </fo:block>
      <fo:block text-align="center" keep-with-previous="always">
      </fo:block>
      <fo:block text-align="center" keep-with-previous="always">
        <fo:block keep-with-previous="auto">
          <fo:external-graphic src="url(file:///C:\data\trunk\jloadtrace\client\reports\images\report7084819372608031458.png)"
          content-width="50%" />
          <!--  content-width="scale-to-fit" -->
        </fo:block>
      </fo:block>
    </fo:block>
  </fo:block>
</fo:block>

A screenshot of the PDF looks as follows, you also see an akward layouting into the footer
area:
[cid:image002.jpg@01CB1C4E.88B967B0]

Thanks... Dominik.


Dominik Stadler, Team Lead
F +43 732 210100008 | E dominik.stadler@dynatrace.com<mailto:dominik.stadler@dynatrace.com>
| Skype: stadler.dominik
dynaTrace is Continuous APM >> Monitor. Resolve. Prevent. >>
Web: http://www.dynatrace.com<http://www.dynatrace.com/> | Blog: http://blog.dynatrace.com<http://blog.dynatrace.com/>
Learn about dynaTrace in 2 minutes<http://www.dynatrace.com/twominutedemo/Default.aspx>
| SDTimes named dynaTrace to SDTimes 100<http://www.sdtimes.com/SDTIMES_100_2009/33549>
This e-mail message, including any attachments, is confidential and may contain legally privileged
information. This message is intended solely for the use of the addressee. Use by others is
prohibited. Disclosure, copying and distribution of this information to third parties is not
permitted. If you have received this message in error, please notify us immediately and delete
it from your system. The integrity and security of this message cannot be guaranteed and it
may be subject to data corruption, interception and unauthorized amendment, for which we accept
no liability.


Mime
View raw message