I tested with the attached example and the result is not what I expected. It is also possible that I don't understand what best fit means.

I was expecting yellow, yellow, yellow. Instead I get yellow, blue, yellow. Can you please comment?

On 4/24/14, 11:58 PM, Luis Bernardo wrote:

Vincent, if you hold off tallying the votes till Monday then I will run some tests before I vote.

On 4/22/14, 5:11 PM, Vincent Hennebert wrote:
Hi,

as you may be aware, Seifeddine Dridi has been working for the past few
months on an extension to manage the white space available in
a document. It is based on the fo:multi-switch element and selects the
first fo:multi-case child that fits on the page. That allows to define
smaller variants in case there is not enough space left on the page.

The approach is similar to what is described here:
http://wiki.apache.org/xmlgraphics-fop/WhitespaceManagement

All patches, comments and discussions are available in the following
JIRA issue:
https://issues.apache.org/jira/browse/FOP-2293

The code is here:
http://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_WhitespaceManagement

It has reached a state where we believe it is ready to be merged to
trunk.

This vote will run until Friday, 25th April 16:00 UTC.

+1 from me.

Thanks,
Vincent


<?xml version="1.0" encoding="UTF-8"?>
    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"; xmlns:fox="http://xmlgraphics.apache.org/fop/extensions";>
      <fo:layout-master-set>
        <fo:simple-page-master master-name="page" page-height="200pt" page-width="100pt" margin="10pt">
          <fo:region-body/>
        </fo:simple-page-master>
      </fo:layout-master-set>
      <fo:page-sequence master-reference="page">
        <fo:flow flow-name="xsl-region-body">
          <fo:block-container height="60pt" background-color="yellow"><fo:block /></fo:block-container>
          <fo:multi-switch fox:auto-toggle="best-fit">
            <fo:multi-case>
              <fo:block-container height="50pt" background-color="blue"><fo:block /></fo:block-container>
            </fo:multi-case>
            <fo:multi-case>
              <fo:block-container height="55pt" background-color="yellow"><fo:block /></fo:block-container>
            </fo:multi-case>
            <fo:multi-case>
              <fo:block-container height="70pt" background-color="red"><fo:block /></fo:block-container>
            </fo:multi-case>
          </fo:multi-switch>
          <fo:block-container height="60pt" background-color="yellow"><fo:block /></fo:block-container>
        </fo:flow>
      </fo:page-sequence>
    </fo:root>

Reply via email to