Loading...
 
Skip to main content

History: Print

Source of version: 31 (current)

Copy to clipboard
            {syntax type="markdown"  editor="wysiwyg"} See also: ((Typography))


[http://stackoverflow.com/questions/12302819/how-to-create-a-printable-twitter-bootstrap-page]


[http://dev.tiki.org/Print] 
{maketoc title=""}

## Print options

- When printing, there should be a bunch of available options (WikiPublisher.org is a great example)
- Most common options are shown by default, and the others in an advanced tab
- Since users tend to each have preferred default settings, system should remember last recent print. Ex. with cookies
- Default options are Tiki prefs. overridable by perspective

### List of options

#### Tiki options

- With / without logo / header
- With / without footer 
    - Option to show / hide: The original document is available at ... (which by the way doesn't site language)
- Cover page
- Table of Content -> Ideas to improve at ((dev:maketoc)) 
    - JavaScript
    - Via wkhtmltopdf
    - None
- Embellish text via ((typography)) lib.
- Links 
    - Hide
    - Show underline and external link icon
    - Put link as footnote
    - Put link just after label
- PluginMouseOver 
    - Hide
    - Show as sidenote
    - Show as footer
- PluginTabs 
    - Print current
    - Print all
- + / - for headers and bullet list, or PluginFade 
    - Print current
    - Open all
- PluginVersions 
    - Print current
    - Print all

#### Feature option

- Wiki page may have different options than printing a tracker item

#### Print engine alternatives

- mPDF is a very powerful PHP library
- wkhtmltopdf is the reference PDF generator and has many options: http://wkhtmltopdf.org/usage/wkhtmltopdf.txt 
    - phpwkhtmltopdf and Snappy should make them all available to Tiki
- WeasyPrint is a Python library
- PhantomJS would be an interesting alternative: http://phantomjs.org/api/webpage/property/paper-size.html 
    - https://github.com/jonnnnyw/php-phantomjs
- SlimerJS now has PDF options: https://github.com/laurentj/slimerjs/pull/195

{HTML()}<script type='text/javascript' src='https://www.openhub.net/p/slimerjs/widgets/project_factoids_stats?format=js'></script>{HTML}

#### Print engine options

See [http://www.mpdfonline.com/repos/mpdfmanual.pdf|mPDF manual] for a large number of examples

- PDF outlines 
    - Table of content -> Ideas to improve at: ((dev:maketoc))
- Header / Footer (Page numbers, title, date / time of print)
- Watermark
- Page sizes (A4, letter, etc) and options
- Print as user X or group Y, which can use to personalize or redact text. Can we use PluginGroup or should be go for creating a PluginRedact?
- etc.

## Other ideas

- It would be nice to use a wiki page to make the template to layout the header / footer / etc.
- Maybe there should be a way to override some mPDF params via a wiki plugin? ex: force a page break. This page in landscape mode. force another page break. This page in portrait mode. Ex.: {print break=page} {print layout=portrait}

## Related links

- http://www.sitepoint.com/10-jquery-print-page-options/



{DIV(class=titlebar)} alias {DIV}


- (alias(Bootstrap print))