Documentation

Shortcodes


[e2pdf-download]

[e2pdf-download id="x"]

Shortcode applied to generate Download link to downloadable PDF

Can be used inside: Extensions Success Messages, Extensions Emails, Wordpress Pages/Posts

Example:

[e2pdf-download id="1" dataset="1" flatten="1" name="name" password="password" button-title="Download" inline="true" auto="true" class="additional-class"]

Required

  • id - ID of the E2pdf Template to use.
    • Value: (int)
    • Usage: [e2pdf-download id="1"]

Optional Parameters

  • dataset - Static ID of dataset to use
    • Value: (mixed)
    • Usage: [e2pdf-download id="1" dataset="1"]
    • Default: Current entry
  • flatten - Flatten or not Flatten PDF
    • Value: (int)
      • 0 - No flatten:
      • 1 - Form flatten:
      • 2 - Full flatten:
    • Usage: [e2pdf-download id="1" flatten="1"]
  • name - Name of downloadable PDF file
    • Value: (string)
    • Wordpress/extension shortcodes allowed
    • Usage: [e2pdf-download id="1" name="name"]
  • password - Password for downloadable pdf file
    • Value: (string)
    • Wordpress/extension shortcodes allowed
    • Usage: [e2pdf-download id="1" password="password"]
  • button-title - Title of button to download PDF file
    • Value: (string)
    • Wordpress/extension shortcodes allowed
    • Usage: [e2pdf-download id="1" button-title="Download"]
  • inline - Download PDF file or show directly inside browser (if supported)
    • Value: (boolen) true or false
    • Usage: [e2pdf-download id="1" inline="true"]
  • auto - Force autodownload when on page/form submited
    • Value: (boolen) true or false
    • Usage: [e2pdf-download id="1" auto="true"]
  • class - Additional class to add to generated link
    • Value: (string)
    • Usage: [e2pdf-download id="1" class="additional-class"]

[e2pdf-attachment]

Shortcode applied to generate attachment to email

Can be used inside: Extensions Emails

Example:

[e2pdf-attachment id="1" dataset="1" flatten="1" name="name" password="password"]

Required

  • id - ID of the E2pdf Template to use.
    • Value: (int)
    • Usage: [e2pdf-attachment id="1"]

Optional Parameters

  • dataset - Static ID of dataset to use
    • Value: (mixed)
    • Usage: [e2pdf-attachment id="1" dataset="1"]
    • Default: Current entry
  • flatten - Flatten or not Flatten PDF
    • 0 - No flatten:
    • 1 - Form flatten:
    • 2 - Full flatten:
  • name - Name of downloadable PDF file
    • Value: (string)
    • Wordpress/extension shortcodes allowed
    • Usage: [e2pdf-attachment id="1" name="name"]
  • password - Password for downloadable pdf file
    • Value: (string)
    • Wordpress/extension shortcodes allowed
    • Usage: [e2pdf-attachment id="1" password="password"]

[e2pdf-save]

Shortcode applied to save file on server

Can be used inside: Extensions Success Messages, Extensions Emails

Example:

[e2pdf-save id="1" dataset="1" flatten="1" name="name" password="password" dir="/home/pdfs/"]

Required

  • id - ID of the E2pdf Template to use.
    • Value: (int)
    • Usage: [e2pdf-save id="1"]

Optional Parameters

  • dataset - Static ID of dataset to use
    • Value: (mixed)
    • Usage: [e2pdf-save id="1" dataset="1"]
    • Default: Current entry
  • flatten - Flatten or not Flatten PDF
    • 0 - No flatten:
    • 1 - Form flatten:
    • 2 - Full flatten:
  • name - Name of saved PDF file
    • Value: (string)
    • Wordpress/extension shortcodes allowed
    • Usage: [e2pdf-save id="1" name="name"]
  • password - Password for saved pdf file
    • Value: (string)
    • Wordpress/extension shortcodes allowed
    • Usage: [e2pdf-save id="1" password="password"]
  • dir - Path to save files
    Directory must exists and be writable. If parameter not used, default dir will be used:
    /wp-content/uploads/e2pdf/tpl/{Template ID}/save/
    • Value: (string)
    • Usage: [e2pdf-save id="1" dir="/home/pdfs/"]

[e2pdf-view]

Shortcode applied to view PDF inside page via pdf.js

Can be used inside: Extensions Success Messages, Wordpress Pages/Posts

Example:

[e2pdf-view id="1" dataset="1" flatten="1" name="name" password="password" width="100%" height="500" class="additional-class" pdf="https://example.com/document.pdf"]

Required

  • id - ID of the E2pdf Template to use.
    • Value: (int)
    • Usage: [e2pdf-view id="1"]
  • OR

  • pdf - Url to static PDF
    • Value: (string)
    • Usage: [e2pdf-view pdf="https://example.com/document.pdf"]

Optional Parameters

  • dataset - Static ID of dataset to use
    • Value: (mixed)
    • Usage: [e2pdf-view id="1" dataset="1"]
    • Default: Current entry
  • flatten - Flatten or not Flatten PDF
    • 0 - No flatten:
    • 1 - Form flatten:
    • 2 - Full flatten:
  • name - Name of saved PDF file *ignored at this moment
    • Value: (string)
    • Wordpress/extension shortcodes allowed
    • Usage: [e2pdf-view id="1" name="name"]
  • password - Password for saved pdf file
    • Value: (string)
    • Wordpress/extension shortcodes allowed
    • Usage: [e2pdf-view id="1" password="password"]
  • width - Width of Viewer
    • Value: (string)
    • Default: 100%
    • Usage: [e2pdf-view id="1" width="100%"]
  • height - Height of Viewer
    • Value: (string)
    • Default: 500
    • Usage: [e2pdf-view id="1" height="500"]
  • class - Additional class to add to generated iframe
    • Value: (string)
    • Usage: [e2pdf-view id="1" class="additional-class"]

[e2pdf-exclude]

Exclude content from rendering inside PDF.

Can be used inside: Wordpress Posts, Wordpress Pages

Example:

[e2pdf-exclude]content[/e2pdf-exclude]


[e2pdf-format-number]

Apply number format to string

Can be used inside: Templates

Example:

[e2pdf-format-number decimal='2' dec_point='.' thousands_sep=',' explode='' implode='']x[/e2pdf-format-number]

Required

  • x - String or Shortcode
    • Value: (mixed)
    • Usage: [e2pdf-format-number]10000000[/e2pdf-format-number]

Optional Parameters

  • decimal - Number of decimals
    • Value: (int)
    • Usage: [e2pdf-format-number decimal='2']1000[/e2pdf-format-number]
  • dec_point - Decimal point used in number
    • Value: (string)
    • Usage: [e2pdf-format-number decimal='2' dec_point='.']1000[/e2pdf-format-number]
  • thousands_sep - Thousands separator
    • Value: (string)
    • Usage: [e2pdf-format-number thousands_sep=","]1000000[/e2pdf-format-number]
  • explode - Separator to explode string
    Shortcode parameters will be applied to each value that was separated
    • Value: (string)
    • Usage: [e2pdf-format-number explode=',']1000000,2000000[/e2pdf-format-number]
  • implode - Separator to implode exploded string
    Shortcode parameters will be applied to each value that was separated
    • Value: (string)
    • Usage: [e2pdf-format-number explode=',' implode='|']1000000,2000000[/e2pdf-format-number]

[e2pdf-format-date]

Apply date format to string

Can be used inside: Templates

Example:

[e2pdf-format-date format='Y-m-d H:i:s']x[/e2pdf-format-date]

Required

  • x - String or Shortcode
    • Value: (mixed)
      • now - Current Datetime:
    • Usage: [e2pdf-format-date]now[/e2pdf-format-date]

Optional Parameters

  • format - Date format in PHP date() function style
    • Value: (string)
    • Usage: [e2pdf-format-date format='Y-m-d H:i:s']now[/e2pdf-format-date]

[e2pdf-format-output]

Apply output format to string

Can be used inside: Templates

Example:

[e2pdf-format-output explode=',' implode='.' output='{0} - {1}' filter='trim']x[/e2pdf-format-output]

Required

  • x - String or Shortcode
    • Value: (mixed)
    • Usage: [e2pdf-format-output]10000[/e2pdf-format-output]

Optional Parameters

  • explode - Separator to explode string
    Shortcode parameters will be applied to each value that was separated
    • Value: (string)
    • Usage: [e2pdf-format-output explode=',']1000000,2000000[/e2pdf-format-output]
  • implode - Separator to implode exploded string
    Shortcode parameters will be applied to each value that was separated
    • Value: (string)
    • Usage: [e2pdf-format-output explode=',' implode='|']1000000,2000000[/e2pdf-format-output]
  • output - Custom output for each exploded value
    'implode' parameter will be ignored in this case
    • Value: (string)
    • Usage: [e2pdf-format-output explode=',' output='{0} - {1}']1000000,2000000[/e2pdf-format-output]
  • filter - Filter value
    • Value: (string) or (string),(string),...
      • trim - Strip spaces at start/end of string
      • strip_tags - Remove html tags
      • strtolower - String to lowercase
      • strtoupper - String to uppercase
      • ucfirst - Uppercase first letter
      • lines - Remove empty lines
    • Usage: [e2pdf-format-output explode=',' filter='trim,ucfirst'] test , e2pdf [/e2pdf-format-output]

Actions


Actions are designed to create dynamic PDFs depending on user input. With actions you can change properties, hide or show elements/pages.

» To add actions to element it's need to go to "Properties" of element (right mouse click) and at the bottom will be "Actions" section, where you can add/edit/remove actions.

» To add actions to page it's need to go to "Properties" of page () and at the bottom will be "Actions" section, where you can add/edit/remove actions.

Action Parameters


Each element or page can have unlimited actions.

  • order - The order of action to fire
  • action - The action to fire
    • hide - hide element/page
    • show - show element/page
    • change - change property of element/page
  • property - The property to change. Available only if action set to "change". List of properties individual for each element/page.
  • change - Change selected property
    With number properties (width, height, top, left, etc) it's possible to use positive and negative numbers (+10, -20, etc), to have property change dynamically depending on current property value.
  • apply if - Apply action if:
    • any - any of conditions fit
    • all - all conditions fit

Condition Parameters


Each action can have unlimited conditions.

  • if - Value to compare. Can be used shortcodes inside
  • condition - Condition
    • = - equals
    • != - not equal
    • > - bigger
    • >= - bigger or equals
    • < - less
    • <= - less or equals
    • LIKE - if "if" contains "value"
    • NOT LIKE - if "if" doesn't contain "value"
  • value - Value to compare with. Can be used shortcodes inside

Tips


You can hold CTRL key and by clicking select several elements

You can remove elements with DELETE key

After selecting elements you can move them with keyboard arrows ( )

If you need resize element by maximum size you can just set 999999 to width/height inside properties

If you want to use Field Keys instead Field IDs with Formidable Forms extension you can set option in "Settings » Formidable"