Loading...
 
Skip to main content

History: PluginPDF

Source of version: 17 (current)

Copy to clipboard
            !  {icon name="file-pdf-o"} Plugin PDF
!! Overview
To use the __PluginPDF__ you must have installed and activated ((mPDF)). It is used to change default Administration PDF Settings and use custom settings for any specific Tiki page. When we apply __PluginPDF__ on any page, all settings made in the plugin take effect on all the pages of the PDF document produced. Edit the page which you want to convert to a PDF document. Click on the Question Mark on the right corner of the editor as shown in the diagram below to open Plugin Help Window. See also: ((PluginPdfpagebreak))

__''Introduced in ((Tiki17|Tiki 17))''__
 
{img type="src" src="display1362" retina="y" responsive="y" styleimage="border"}
 
It will open up the Help Window, click on “Plugin Help” and type in the Filter search box “PDF” and three plugins will appear in the list. Click on the icon before PluginPDF to open PluginPDF Options.

{img type="src" src="display1364" retina="y" responsive="y" styleimage="border"}
{pdfpagebreak }


You get to see the list of PDF Options here, if you do not change or use any of the options then default options setup from the admin panel will be used. If you modify any PDF settings here on the page using the plugin then the new settings will be used. 

{img type="src" src="display1365" retina="y" responsive="y" styleimage="border"}
 

!!PluginPDF Parameters 
{pluginmanager info="description|parameters" plugin="pdf"}

!!Sample PluginPDF Code

{CODE(colors="tiki")}
{pdf  pagesize="A4" toc="n" pagetitle="n" header=" Document Title |  | {DATE j-m-Y }"footer="Document Copyrights | www.example.org |{PAGENO}" margin_left="10" margin_right="10" margin_top="20" margin_bottom="20" margin_header="10" margin_footer="10" coverpage_text_settings=" "  coverpage_image_settings="http://example.org/filename.jpg" toc="y" toclinks="y" tocheading="Table of Contents" toclevels="H1|H2|H3"  }
{CODE}

!!Margin Top & Margin Header

This needs to be configured correctly for the page contents and header contents appear without overlapping. Margin Top is the space between document top and the contents of the document. And Margin Header is the space between Header and the document top. Check the diagram below:

{img type="src" src="display1363" retina="y" responsive="y" styleimage="border"}
{pdfpagebreak }
!!Cover Page 
|| This features allow users to add a cover page to their PDF comprising of a background image and text on top of it. There are two variables to set this up. This cover page is not visible on the TIKI page but will be added whenever a PDF is produced. Following is the image size guide to help design some great PDF cover pages. | {img type="src" src="display1361" retina="y" responsive="y" styleimage="border"}||

!!!Image Size and Dimensions for Cover Page 
Image Resolution: DPI / PPI 96
{FANCYTABLE(head="Page Size | Image Dimensions" colwidths="30% | 70%" colaligns="left|left" colvaligns="middle|middle")}
Letter | 816 x 1056 px
Legal | 816 x 1344 px
Ledger | 1056 x 1632 px
A0 | 3179 x 4494 px
A1 | 2245 x 3179 px
A2 | 1587 x 2245 px
A3 | 1123 x 1587 px
A4 | 794 x 1123 px
A5 | 559 x 794 px
A6 | 397 x 559 px
{FANCYTABLE}

!! Advanced Usage With PluginList
If you need to pass data from your content into the parameters for plugin PDF you can use markup like this. This example formats a footer for each page using tracker item data depending on the -+itemId+- parameter on the URL.
{CODE(colors="tiki")}{LIST()}
  {filter type="trackeritem"}
  {filter field="object_id" content="{{itemId}}"}
  {OUTPUT()}#{display name="tracker_field_id"}
    {display name="wikiplugin_pdf" format="wikiplugin"  orientation="P" footer="footer" margin_bottom="20"}
  {OUTPUT}
  {FORMAT(name="footer")}
    {literal}#{display name="tracker_field_id"} - {display name="tracker_field_title"} - {display name="creation_date" format="date"}| | AT {display name="tracker_field_building_text"}|{PAGENO}{/literal}
  {FORMAT}
  {ALTERNATE()}^No DSO data found^{ALTERNATE}
{LIST}
{CODE}


{include page="PDF related pages"}