Thanks Tony!
 The purpose was to remind BTC and Jeremy to upgrade the print feature and 
perhaps publish a polished PrintRiver from BTC as official plugin.
 Please support at github: 
https://github.com/Jermolene/TiddlyWiki5/issues/4352
 
--Mohammad


On Tuesday, March 17, 2020 at 12:58:57 AM UTC+3:30, TonyM wrote:
>
> Mohammad,
>
> I expect you know but tables built using thead, tfoot and tbody (in that 
> order) can paginate tables when printing. Being able to set a height and 
> activate scrolling would be helpful. Once combined with page headers and 
> footers it can get complex but it is possible. In time I will present some 
> solutions (IF you don't beat me to it).
>
> Regards
> Tony
>
> On Tuesday, October 29, 2019 at 5:09:50 PM UTC+11, Mohammad wrote:
>>
>> Hello Tony!
>>  Many thanks for sharing your solution. Yes, that is true.
>> I think TW deserve to have a print preview page and lets adjust margins, 
>> show/hide elements, choose paper and like that.
>> The solution started by BTC <http://print-tiddler.tiddlyspot.com/>is 
>> great but it needs to be completed and also include support for tables, ... 
>> you mentioned here.
>>
>> I have added your points and css to http://tw5-print.tiddlyspot.com/  
>> for future reference.
>> I also welcome if you have any further comment on 
>> http://tw5-print.tiddlyspot.com/
>>
>> --Mohammad
>>
>> On Tuesday, October 29, 2019 at 3:05:09 AM UTC+3:30, 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/baae7ce7-9e89-45e6-b492-9e723cc17fdc%40googlegroups.com.

Reply via email to