Documentation

Shortcodes


[e2pdf-download]

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-adobesign]

Shortcode can be used for uploading and creating agreements with Adobe Sign REST API

By default shortcode will do current API Calls :

or can be extended via filters:

Can be used inside: Extensions Success Messages, Extensions Emails

Example:

[e2pdf-adobesign id="1" recipients="[email protected],[email protected]"]

Required

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

Optional Parameters

  • dataset - Static ID of dataset to use
    • Value: (mixed)
    • Usage: [e2pdf-adobesign id="1" dataset="1"]
    • Default: Current entry
  • recipients - Recipients emails to send PDF to
  • 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-adobesign id="1" name="name"]
  • password - Password for pdf file
    • Value: (string)
    • Wordpress/extension shortcodes allowed
    • Usage: [e2pdf-adobesign id="1" password="password"]
  • disable - Disable DEFAULT (transientDocuments, agreements) API calls
    • Value:
      • post_transientDocuments - Disable upload request of PDF to Adobe Sign to get transientDocumentId
      • post_agreements - Disable create agreement request
    • Usage: [e2pdf-adobesign id="1" disable="post_transientDocuments,post_agreements"]

[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]

Conditions


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

» To add conditions 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 condition actions.

» To add conditions 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 condition 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

Actions & Filters


Actions & Filters can be applied to extend functionality of E2Pdf.

Actions


Filters


e2pdf_model_shortcode_e2pdf_adobesign_fileInfos

  • Location: /e2pdf/classes/model/e2pdf-shortcode.php
                    
add_filter('e2pdf_model_shortcode_e2pdf_adobesign_fileInfos', 'e2pdf_example_callback', '30', '6');
function e2pdf_example_callback($documents, $atts, $template, $entry, $extension, $file_path) {
      return $documents;
}

e2pdf_model_shortcode_e2pdf_adobesign_post_agreements_data

  • Location: /e2pdf/classes/model/e2pdf-shortcode.php
                    
add_filter('e2pdf_model_shortcode_e2pdf_adobesign_post_agreements_data', 'e2pdf_example_callback', '30', '7');
function e2pdf_example_callback($data, $atts, $template, $entry, $extension, $file_path, $documents) {
      return $data;
}

e2pdf_model_shortcode_e2pdf_adobesign_response

  • Location: /e2pdf/classes/model/e2pdf-shortcode.php
                    
add_filter('e2pdf_model_shortcode_e2pdf_adobesign_response', 'e2pdf_example_callback', '30', '8');
function e2pdf_example_callback($response, $atts, $template, $entry, $extension, $file_path, $documents, $agreement_id) {
      return $response;
}


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"