Proposal: A TiddlyWiki Print Dialog

A TiddlyWiki plugin that provides a user-friendly dialog for printing would greatly simplify the process of printing and exporting to PDF… The plugin aims to make printing more flexible, customizable, and visually appealing by leveraging modern web technologies. Here are the key features and enhancements planned for the plugin:

  1. Modern CSS for Printing:
    The plugin will utilize the latest CSS features, including the CSS Paged Media module, to provide advanced and attractive print layouts. This will ensure that printed content looks professional and is easy to read.

  2. Custom Headers, Footers, and Page Layouts:
    Users will be able to define custom headers and footers for printed pages. The plugin will also allow configuration of page size, orientation (portrait or landscape), and margin boxes, offering granular control over the appearance of printed documents.

  3. Print Profiles:
    The plugin will support the creation and selection of print profiles. Each profile can store settings such as page size, margins, header/footer content, and CSS themes. This makes it easy to switch between different print configurations for various needs.

  4. Tiddler Range and Order Selection:
    Users will be able to select which tiddlers to print, specify the order in which they appear, and even select specific ranges. This feature is especially useful for compiling custom reports or exporting collections of tiddlers.

  5. Preview and Customization:
    A live preview will be available, enabling to view the exact appearance of their document prior to export to PDF or print on paper. Users can modify settings in real time and observe the immediate effects. [This utilizes the built-in browser print dialog]

  6. Advanced Options:
    Additional options may include the ability to exclude certain elements, add page numbers, control image scaling, and support for table of contents generation.


Prototype: Print Dialog Window

Here’s a conceptual prototype of the print dialog window that could be implemented as part of the plugin:

+------------------------------------------------------+
|                TiddlyWiki Print Dialog               |
+------------------------------------------------------+
| [ ] Select Tiddlers to Print:                        |
|     [ ] All Tiddlers                                 |
|     [ ] Current Tiddler                              |
|     [ ] Custom Selection  [Choose...]                |
|                                                      |
| [ ] Order:                                           |
|     [ ] By Title   [ ] By Modified Date   [ ] Custom |
|                                                      |
| [ ] Print Profile: [Default ▼] [Manage Profiles...]  |
|                                                      |
| [ ] Page Settings:                                   |
|     - Size: [A4 ▼]                                   |
|     - Orientation: [Portrait ▼]                      |
|     - Margins: [Normal ▼]                            |
|                                                      |
| [ ] Header/Footer:                                   |
|     - Header: [Edit...]                              |
|     - Footer: [Edit...]                              |
|                                                      |
| [ ] Preview:                                         |
|  +----------------------------------------------+    |
|  | [Live preview of the print layout here]      |    |
|  +----------------------------------------------+    |
|                                                      |
| [Print]   [Cancel]   [Advanced Options ▼]            |
+------------------------------------------------------+

Further Development Ideas

  • Batch Printing:
    Allow users to save and reuse groups of tiddlers for repeated printing tasks.

  • Custom CSS Editor:
    Provide an interface for advanced users to tweak or write their own print CSS.

  • Accessibility Features:
    Ensure the print dialog and output are accessible, with options for larger fonts or high-contrast modes.

  • Localization:
    Support multiple languages for the dialog interface.


Summary

This plugin will transform the TiddlyWiki printing experience by providing a powerful, flexible, and user-friendly print dialog. It will cater to both casual users wanting quick prints and power users needing advanced customization.

References

4 Likes

This is a proposal for the active user community, and I hope one or more volunteers will take the initiative to develop the plugin.

2 Likes

I do like this idea. I just started on a new wiki that might benefit from this.

I think it’s a non-trivial undertaking. Mostly because there are parts I don’t know how to do and have never seen done. But also because parts of the UI seem difficult to put together.

Have you seen any web applications that do these things? To my mind, printing has always been in the purview of the browser and not the application. Your recent posts do show how much is possible, but I still don’t know, for instance, how we would be able to choose which tiddlers to show, unless we first replace the story list. It’s not that I think this is impossible, but I’ve simply never seen prior art.

I’m interested in seeing a useful UI for “Custom Selection [Choose …]” For a small wiki, a list of checkboxes might be enough. A larger one might have a search/list tags-like interface. And any wiki might be able to use a dynamic filter for power users. But I can’t quite picture how to combine these options… perhaps with tabs. And of course the power user’s filter might also cover sorting, so it gets slightly complex.

2 Likes

Indeed! I attempted to use a modal window as a print dialog and inject selected tiddler for printing into the list field of storyList. However, it might be more convenient to request a modification tm-print to allow sending parameters to it.

I neglected to acknowledge the work by @BurningTreeC in PrintRiver — v0.3.1.

Simon has successfully addressed some challenging aspect of print dialog. His solution allows to set the filtered list of tiddler for printing.

I partially implemented this using TiddlyWiki Alternative Page Layout! I tried to use the existing features (mostly by transcluding).

  • User can switch to Print Layout, select tiddlers for printing, use the open tab to reorder them, and then click on Print button.

  • Saved print job! switch print profiles and customize a profile or create new one are in todo list.

msedge_img_613_20250524

2 Likes

That sounds wonderful! Is there a preview available somewhere?

1 Like

I share it soon! The beta version is ready!

2 Likes

I applaud this project and having some knowledge of the issues happy to contribute to it.

Some thoughts (that are contestable)

I have found building a document within a single tiddler, opening it in a new window and printing from there a very helpful approach. As a result I can see being able to save the print details within that tiddler, and providing the ability to get a page preview which allows selection pf page breaks in the body of the tiddler would be helpful.

  • This is to me a tiddlywiki approach, build a view ina tiddler of one or more tiddlers as a print view and print that. All we need to do is to set up the css and page breaks within that, when printing.
  • However it is similtaniously helpful to consider such a tiddler a useful way to view consolodated content so the acompaning screen reading view should be useable in its own right. eg pageable single tiddler content.
  • There is an ongoing effort to make a true single tiddler view as well.
  • Some people may like to use a wiki to provide an online report that can be freely printed and look good in both cases.

We need to acknowledge that most printing today is usually to PDF rather than printer but both are relevant, and its trivial to print a PDF even with some tweeking. We can use

1 Like

I think the ultimate goal is to export articles that are easy to read. With the help of tailwindcss, I think it is easy to hide unnecessary elements without writing other css. If you have seen my website, you will find that every article prints out well.

ps: Tiddlywiki itself also has some printing-related optimization styles

1 Like

Thank you @oeyoews
I will review and see how I can utilize Tailwind CSS for proper formatting and pretty printing.

The next step
I created few “Print Profiles”, one is Slide, It allows you to print or save to PDF tiddlers like a slide.
It uses

  • Caption instead of title (if exist)
  • Add page number at the bottom
  • Use custom font family and font size
  • Use landscape page with 16:9 or 4:3 for wide or old screens.

Here is few screen shots:

Tiddlers containing slide looks like

When saved to PDF (or printed) They are like below


Please note the slides in the PDF include page numbers in the footer area and captions instead of titles. Unfortunately, some of these features are not compatible with FireFox.

TiddlyWiki is GREAT! Endless features :heart_eyes::muscle::muscle::muscle:

1 Like

This proposal is now available as a plugin here.
Printify Plugin: Smart, Structured, and Effortless Printing - Plugins - Talk TW