> Hi Jeff,
> 
> Do your "multipage reports" properly handle page
> breaks or are they plain vanilla HTML ?

Good question.  We do have two style sheets, one for screen, one for
print.  We're a small shop and haven't dedicated as much time as I would
like towards style sheets.  Here's some code that might help.

def stylePrint(self):
        return '''
            .pageBreakAfter {page-break-after: always}
                .pageBreakCopyright {page-break-after: always}
                .hideLine {display: none;}
                '''

def styleScreen(self):
        return '''
                .hideCopyright, .pageBreakCopyright {display: none;}
                '''

def writeStyleSheet(self):
        self.writeln('''
                <style id=print media="print">%s</style>
                <style media="screen">%s</style>
                ''' % (self.stylePrint(),self.styleScreen()))

def writeHeadParts(self):
        '''
        Writes the parts inside the <head>...</head> tags. Invokes
        writeTitle() and writeStyleSheet(). Subclasses can override this
        to add additional items and should invoke super.
        '''
        self.writeTitle()
        self.writeStyleSheet()
        self.writeScript()


> Does anybody know about tricks to create HTML that
> i.e. breaks a long table at a configured page break
> and adds a table footer, a page foot, the break, a new
> page header and a table header ... 

The code above not only allows page breaks when printing but also hides
demonstrates how an object can be hidden on the screen but shown on
print or vice versa.

> By configure I mean: Toggle between US Letter or
> european A4 size.

I highly recommend the book "Cascading Style Sheets - Designing for the
web", it is co-written by the creator of CSS, is written and illustrated
very well.  Page 255 talks a little about using percentages for margins
to accomodate A4 vs US Letter but I don't know if it allows the control
you might want.

-Jeff






_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to