PrintPDF

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

{{{version}}}

Files
  • printpdf.swf
  • printpdf.asul
  • printpdf.php
Related plugins

This plugin is built on the Print plugin, and basically offers the same functionality, except that it does not use a printer available to the client, but instead uses the AlivePDF library to generate a PDF file from the selection the user made. This file can then be saved by the user by "downloading" it, using the PHP script. Note that any other server side scripting language works for this. See the AlivePDF site for more information regarding that.

Known issue: all objects printed are rasterized first, resulting in a lower resolution (i.e. no vector graphics are output). This is a limitation of the AlivePDF library, and cannot be avoided at this time.

Settings

{{#switch:left | left =

{{#switch:{{#if: | {{{smallimage}}} | }} | none =

| #default =

}} {{#if:{{#if: | {{{smallimageright}}} | }} | {{#ifeq:{{#if: | {{{smallimageright}}} | }}|none | | }} }}

| #default =

{{#switch: | none =

| #default =

}}

{{#if: | {{#ifeq:|none

 | 
| }} }}

}} This plugin uses or defines the following additional settings.


REMARK

The option to create PDF files out of selected pages is no longer working because of a change by Adobe in FLASH; for security reasons. A feature needed for this option (for the communication with the server) is no longer supported.

As alternative please use the option to offer a full PDF for download in setting the printpdf and printpdfsaveonly accordingly. Or provide "chunks" of the PDF file with special links (linked icons, text, areas) at the appropriate positions in your MZ3-Title. How to use the this plugin with version 2.2.0 is explained in our MegaZine3 Blog

== printpdf =={{#if: String |

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

Path to a PDF file which represents the whole book, and which is offered to the user as a download when set.{{#if: |

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

== printpdfname =={{#if: String |

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

The name of the PDF file to generate (i.e. the default name given when the download starts).{{#if: |

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

== printpdfsaveonly =={{#if: Boolean |

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

When set to true, the page selection will never be used. Instead, the button in the navigation bar will directly trigger the download of the PDF set in printpdf. If book@printpdf is not set, this attribute is ignored.{{#if: |

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

Attributes

{{#switch:left | left =

{{#switch:{{#if: | {{{smallimage}}} | }} | none =

| #default =

}} {{#if:{{#if: | {{{smallimageright}}} | }} | {{#ifeq:{{#if: | {{{smallimageright}}} | }}|none | | }} }}

| #default =

{{#switch: | none =

| #default =

}}

{{#if: | {{#ifeq:|none

 | 
| }} }}

}} This plugin only uses its inherited attributes.

Examples

<book plugins="printpdf" printmaxpages="25" printthumbsperpage="10" printpdfname="MyBrochure.pdf">
    <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: | |}}