[
https://issues.apache.org/jira/browse/FOP-2293?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Seifeddine Dridi updated FOP-2293:
----------------------------------
Attachment: FO_multi-switch_best-fit_ext_rev2.patch
Hello again,
I reimplemented the best-fit extension from scratch. Now it integrates quite
well with the Knuth-Plass algorithm, but I had to remove the smallest-fit and
biggest-fit strategies, leaving only first-fit.
The code for the best-fit layout manager is now inside a separate helper class,
since the best-fit extension is completely handled by its parent FO
multi-switch and it cannot be used on its own.
I tried to stick with the convention that the FO tree should not be modified to
handle constraints on other levels. Remember my earlier example of FO inline
inside a multi-case? I couldn't find a reasonable solution for that one yet,
which works well even when the best-fit property is set.
My latest patch contains a layout-engine test (_multi-switch_best-fit.xml_)
which can be found in _test/layoutengine/standard-testcases_ once you apply the
patch. The code for the best-fit extension is actually quite simple for anyone
who understands how the Knuth-Plass algorithm works. But if you have questions
or suggestions, feel free to ask.
Please let me know if you spot a bug.
Thanks,
Seifeddine
> Whitespace management extension
> -------------------------------
>
> Key: FOP-2293
> URL: https://issues.apache.org/jira/browse/FOP-2293
> Project: Fop
> Issue Type: New Feature
> Components: general
> Affects Versions: trunk
> Reporter: Seifeddine Dridi
> Priority: Minor
> Labels: XSL-FO
> Fix For: trunk
>
> Attachments: bestfit.fo, doc.pdf,
> FO_multi-switch_best-fit_ext_rev2.patch, FO_multi-switch_test.fo,
> FO_multi-switch_with_best-fit_extension.patch, multiple-feasible-nodes.fo,
> multi-switch_bestfit.fo, patch.patch, patch-rev1.1.patch, patch-rev1.patch,
> patch-rev2.patch
>
>
> I have been working on an extension for whitespace management, similar to
> what's described here:
> http://wiki.apache.org/xmlgraphics-fop/WhitespaceManagement
> The logic of the extension is very simple: the user defines a set of
> alternatives that he wishes to insert at the end of a page, then if there is
> enough space left, FOP will pick the alternative that best matches the user's
> selection criteria (first fit, smallest fit, biggest fit).
> This is my first work on FOP and it took me almost 2 months to reach this
> stage in development. But it's not the end of course, so I'm relying on your
> feedback to improve it.
> Thank you
--
This message was sent by Atlassian JIRA
(v6.1#6144)