Pavlos Christoforou wrote:
Hi Hannu -
On Sat, 13 Nov 1999, Hannu Krosing wrote:
I have written an additional (non-html btw) tag <PAGE> that implements a page break.
Is this the right approach ?
My intention was not to implement yet another document generation language, but I understand that HTML is not enough for nicely formated docs. A pagebreak tag is essential for good formating.
Or should this be a (configurable) attribute of some headers or an attribute to HR or whatever.
I am not sure. If the number of 'extra' attributes required for decent formating is not large then we can add them as extra tags (definetely pagebreak is one of them. Even TeX with its advanced layout algorithms still gets pagebreaks wrong occasionally.
What I meant was adding something like an attribute page_break_before to either <Hn> or <P> or even making it a mandatory for some styles by specifying it on the properysheet - H1_page_break_before
What do you think? I need to get some feedback and then I will add them in the next release.
The _right_ (tm) approach would be to implement support for CSS2 (and test it on something really complex like MSWord2000 MS-XML-(X)HTML docs ;) The one that actually can be done in reasonable amount of time would be a minimal set of additional tags (maybe only <page>) an some attributes for some tags - page_break_before, page_break_after with their counterparts no_ page_break_xxx to override style defaults. And a possibility to set such style defaults. And maybe a few pages of explanations of how the thigs work and what one has to do to add stuff. The code seems quite well structured, but even after actually adding the <page> tag I'm not sure I did it the best way (or that I understand how it does what it does ;). I suspect most of my not fully understanding it comes from my lazyness in reading the PDF spec. I will also need to disable page headers and footers (my current need is printing exactly positioned addresses on postcards) and next I will add a feature to make them optional (unless this already exists ?)
and yes *please* send your patches to me:
Done. -------------- Hannu