An example of the header space in a table, as defined in above css;
<thead>
<tr class="header-space">
<td colspan="5" style="border: none; background-color: white;"> </td>
</tr>
<tr style="border: none;">
<td style="width: 10%; border: none; background-color: white;"></td>
<td colspan="3" style="width: 80%; font-size: 150%; border: none; background
-color: white;">''{{!!list-header}}''</td>
<td style="width: 10%; border: none; background-color: white;"></td>
</tr>
Tony
On Tuesday, October 29, 2019 at 10:35:09 AM UTC+11, TonyM wrote:
>
> Mohammad more...
>
> If your print tiddler consists only of a table, you can use online
> documented methods to repeat headings and throw page breaks using
> <thead><tfoot><tbody> tags (in that order).
>
> CSS in a @media print is only applied at print time, see below for one I
> created as a start.
>
> If you are printing more than a single tables you will need to include
> page headers and footers, if you use both it does get a little more complex.
>
> With both page headers and a table the trick is to define css to create
> headers and footers with fixed positions (and height) but use this same
> height in an invisible table row in the header and footer of the table so
> it does not overwrite the page header and footer.
>
> @page {
> margin: 1cm;
> }
>
> @media print {
> header {
> position: fixed;
> top: 0;
> width: 100%;
> }
> footer {
> position: fixed;
> bottom: 0;
> text-align: centre;
> width: 100%;
> }
> tfoot {
> page-break-after: always;
> }
> thead {
> display: table-header-group;
> }
> tbody {
> page-break-inside: avoid;
> }
> tr, td {
> page-break-inside: avoid;
> }
> /* Spaces added as rows in tables to stop overlap of page header and
> footer, hidden on screen */
> .header-space {
> height: 110px;
> border-style: none;
> border: none;
> width: 100%;
> }
> .footer-space {
> height: 80px;
> border-style: none;
> border: none;
> width: 100%;
> }
> }
> /*
> @media screen {
> .header-space {
> display: hidden;
> }
> .footer-space {
> display: hidden;
> }
> }
> */
>
>
> I will watch this thread if you need additional help.
>
> Regards
> Tony
> On Tuesday, October 29, 2019 at 10:19:48 AM UTC+11, TonyM wrote:
>>
>> Mohammad,
>>
>> I recently developed a solution for a client. I will look at your links
>> soon.
>>
>> I avoided the complexity of dealing with printing from the tiddlywiki
>> page and printing the story. Instead I did what I could to make the
>> contents of a single tiddler wysiwyg what you see is what you get (except
>> pagebreaks), you could read the tiddlywiki.com reference to substories
>> if you did want to print a story.
>>
>> One you have a single tiddler displaying what you want use open in new
>> window and trigger the print from there. This removed the complexity of the
>> full page from the print process.
>>
>> I have seen some cases where the new window looses some css and you may
>> need import variables or transclude css into your print tiddler so its
>> available in the new window (as a last resort).
>>
>> I will post more tips from my desktop.
>>
>> Tony
>>
>>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/83a86b64-79b9-44dd-9397-c284fb2606cb%40googlegroups.com.