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

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

[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
    If not used, default dir /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" 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"]

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