Print

From MegaZine3
Jump to navigation Jump to search
{{#if: Print.jpg | }} {{#if: | }}{{#if: * print.swf
  • print.asul |
}}{{#if: * Navigationbar}}
Plugin: Print
Print.jpg
Name Print
Since version

{{{version}}}

Files
  • print.swf
  • print.asul
Related plugins

The print plugin adds print functionality to the book. On the API level it allows printing any set of pages, on the GUI level it makes a window available in which the pages that should be printed can be selected by the user, either by selecting thumbnails or by entering the page numbers or pages ranges in a text field.

Settings

This plugin uses or defines the following settings.

== printstretch =={{#if: Boolean |

  • Type: Boolean}}{{#if: |
  • Valid values: {{{valid}}}}}{{#if: true |
  • Default: true}}{{#if: |
  • Overrides: {{{overrides}}}}}{{#if: |
  • Aliases: {{{alias}}}}}{{#if: |
  • Version: {{{version}}}}}

Whether to stretch the content to the available size of the pages printed to or keep the original size. This applies to both images rendered from the visible book pages and alternative print content loaded due to the page@print attribute.{{#if: |

  • See also: {{{see}}}}}

== printselectcurrent =={{#if: Boolean |

  • Type: Boolean}}{{#if: |
  • Valid values: {{{valid}}}}}{{#if: true |
  • Default: true}}{{#if: |
  • Overrides: {{{overrides}}}}}{{#if: |
  • Aliases: {{{alias}}}}}{{#if: |
  • Version: {{{version}}}}}

When set to true, the two (or one, if at the front or back cover) pages will automatically selected when opening the print frame. Otherwise the initial selection will be blank.{{#if: |

  • See also: {{{see}}}}}

== printthumbsperpage =={{#if: Integer |

  • Type: Integer}}{{#if: |
  • Valid values: {{{valid}}}}}{{#if: 25 |
  • Default: 25}}{{#if: |
  • Overrides: {{{overrides}}}}}{{#if: |
  • Aliases: {{{alias}}}}}{{#if: |
  • Version: {{{version}}}}}

The number of thumbnails to show (per thumbnail page). This is the maximum number of thumbnails shown at once, if there are more pages in the book than thumbnails may be shown the user will have to flip through the thumbnail pages to select other book pages via their thumbnails.{{#if: |

  • See also: {{{see}}}}}

== printmaxpages =={{#if: Integer |

  • Type: Integer}}{{#if: |
  • Valid values: {{{valid}}}}}{{#if: 50 |
  • Default: 50}}{{#if: |
  • Overrides: {{{overrides}}}}}{{#if: |
  • Aliases: {{{alias}}}}}{{#if: |
  • Version: {{{version}}}}}

The number of pages that may be printed simultaneously. This is limited per default, because all page content of pages that should be printed (or their alternative image) will have to be loaded into memory and kept there until the print job was finished. This can cause out of memory errors, thus possibly crashing the browser. Therefore it is not recommended to choose a number too big, here. On the contrary, if you experience browser crashes while printing, try to reduce this number / printing less pages at a time.{{#if: |

  • See also: {{{see}}}}}

Attributes

Page

=== print ==={{#if: String |

  • Type: String}}{{#if: |
  • Valid values: {{{valid}}}}}{{#if: |
  • Default: {{{default}}}}}{{#if: |
  • Overrides: {{{overrides}}}}}{{#if: |
  • Aliases: {{{alias}}}}}{{#if: |
  • Version: {{{version}}}}}

URL to an image that will be used as the page content when printing this page. Use this to provide high resolution graphics (similar to the gallery plugin's hires attribute). If not set, a snapshot of the page will be rendered. Note that in that case the resolution of the generated image will equal the original page size (i.e. the values of the book@pagewidth and book@pageheight attributes), so if available it is recommended to provide this value.

This attribute can be localized (defining a print alternative for different languages) using the following syntax:

print="de(print/alt_de.swf);en(print/alt_en.swf)"

I.e. for each language alternative, use the language id (two letter ISO 639-1 code), followed by the path to the file to use for that language in parentheses.{{#if: |

  • See also: {{{see}}}}}

Examples

<book plugins="print" printmaxpages="25" printthumbsperpage="10">
    <chapter>
        <page print="hires/a.jpg">
            <img src="a.jpg"/>
        </page>
        <page print="hires/b.jpg">
            <!-- ... -->
        </page>
    </chapter>
</book>
MegaZine3 Plugin-related articles
Plugins Anchors · Background Sounds · Batchpages · Bookmarks · Console · ElementIDs · Gallery · Google Analytics · Help · JavaScript · Keyboard Navigation · Links · NavigationBar · Options · Overlays · Password · PDFLinks · Print · PrintPDF · SWFAddress· Search · Sidebar · Slideshow · Titles
Plugin Articles Writing a plugin · Writing a plugin II · Plugin development

{{#if: | |}}