Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

...

...

Table of Contents
absoluteUrltrue
excludeSee Also
typeflat
separatorpipe

Overview

Excerpt
hiddentrue

export content as a pdf 

The {pdf-export} macro  macro is used as an Action action to export a page or blog post in PDF format and adds the pdf to the page as an attachment.

...

You must install the K15t Scroll PDF Exporter app in order to use this macro. 

If the K15t Scroll PDF Exporter app is disabled or not installed, then the macro is ignored.

If you wish to export only content that is in a Comala workflow final state then you must install the Comala Document Management for Scroll Exporter app (it is free but it can only be installed after K15t Scroll PDF Exporter and Comala Document Management have been installed).

Info

Note that the {The pdf-export} macro is only supported if used with Scroll PDF Exporter 4.10.11 11 or higher

Where to use it?

Optional

The {pdf-export} macro can be put in a {trigger} macrotrigger macro.

Parameters

Parameter

Required

Default

Notes

template

No

Blank

If the template parameter is not specified, the bundled 'Documentation' template is used.

Value can be one of:

  • Template Name

  • Template ID

K15t recommend this parameter value to be added as the template id. The template ID is found in the K15t Scroll PDF Exporter dashboard.

If the specified template is not recognized, the exported pdf will use the bundled 'Documentation' template (default template).

Info

Note that use Use of the template parameter in the {pdf-export} macro macro is only available with Comala Document Management 6.13 or higher.

Setting a template to use for export

To specify a template, use the template name in the {pdf-export} macro as shown.

Code Block
{pdf-export:template=Article}

K15t recommend the use of the template ID.

You can find the value of the template ID by accessing the K15t Scroll PDF Exporter dashboard

  • Space Tools > Apps > Scroll PDF Exporter
    Image Modified

  • Global Admin > Scroll PDF Exporter > Templates

    Image Removed

    Image Added

  • find the template you want to use (or create a new template)

  • choose Template Information from the template ellipsis dropdown menu

    Image RemovedImage Added



  • copy template ID from the K15t app popup template information

    Image RemovedImage Added



  • add to the 

    {

    pdf-export

    }

     macro in the workflow trigger macro

If you have created or downloaded a new pdf template in the K15t PDF Exporter app the template id will be a slightly different format to the K15t app supplied templates.

...


Copy the hexadecimal template id from the Template Information.

...

Paste the template id into the pdf-export macro in the trigger.

Code Block
{pdf-export:template=4e0e8c19-67ac-4f3e-864e-1090d5ae0556}

Basic example

Code Block
languagetextthemeRDark
{workflow:name=Export PDF on Approval}
   {state:Editing|submit=Review}
   {state}
   {state:Review|approved=Approved|rejected=Editing}
      {approval:Review}
   {state}
   {state:Approved|updated=Editing|final=true}
   {state}
   {trigger:statechanged|state=Approved}
      {pdf-export}
   {trigger}
{workflow}

The statechanged event for the transition to the Approved state will add a pdf export of the current content as a file attachment to the current page. If no template name of id is specified the K15t PDF Exporter app uses the default template.

  • each occurrence adds a further pdf export attachment

...

The exported pdf filename by default is generated as

  • the content filename

  • the Confluence content version at the time of the export

  • and the date and time of the export.

The K15t admin can change the export filename structure.

If the K15t app is unable to recognize a template id or name

  • the pdf export will still occur but the default template will be used

  • an on-screen message will confirm the use of the default pdf export template

...

Events

The following Events are associated with pdf-export

  • pdf-export-success

  • pdf-export-error

Example

Code Block
languagetextthemeRDark
{trigger:pdf-export-success}
	{set-message:style=success|duration=PT1M}
	pdf export successfully completed
	{set-message}
{trigger}
{trigger:pdf-export-error}
	{set-message:style=warning}
	pdf export failed. @errormessage@
	{set-message}
{trigger}

See Also