Difference between revisions of "Seon plugin seonplugin transmission pdf"

From Seon
Jump to: navigation, search
(New page: == Summary == The plugin "seonplugin_transmission_pdf" dynamically creates a PDF file containing information about an Seon job (like sender, recipient, meta information and files). It opti...)
 
Line 1: Line 1:
 
== Summary ==
 
== Summary ==
 
The plugin "seonplugin_transmission_pdf" dynamically creates a PDF file containing information about an Seon job (like sender, recipient, meta information and files). It optionally sends this PDF file as an email to the corresponding person (see below for details).
 
The plugin "seonplugin_transmission_pdf" dynamically creates a PDF file containing information about an Seon job (like sender, recipient, meta information and files). It optionally sends this PDF file as an email to the corresponding person (see below for details).
 +
 +
== "Corresponding person" ==
 +
In this documentation, a "corresponding person" is often noted. This person is:
 +
*outgoing jobs: the sender
 +
*incoming jobs: the recipient
 +
of the Seon job. All data extracted person are being used.
  
 
== Configuration ==
 
== Configuration ==
Line 20: Line 26:
  
 
=== Behaviour configuration ===
 
=== Behaviour configuration ===
 +
*Use initial state instead of actual state: Filenames will be extracted from the initial XML of the job. This has advantages of you're using plugins such as TAR or ZIP creation plugins which use technical temporary filenames. File sizes and contents will be first checked at the position of the original state, as a fallback in the configured job directory (set by the [[Seon plugin seonplugin_filemove|filemove plugin]]).
 +
*Render unknown filesizes: If no filesize is retrievable, a text block will be added stating that the size is not known.
 +
*Analyze archive files: Known archive files (which are ZIP, TAR and gzip'ed TAR archives) will be scanned for the contained filenames and sizes. The content of these archives are also listed in the PDF per file. The mechanism is non-recursive.
 +
*Disable mail sending: If enabled, no mail will be sent to the corresponding person.
 +
*Debug mail execution: Mail sending might not work if not configured properly, so all commands which are used for mail transmission are logged in the plugin logs.
 +
 +
== Templating ==
 +
A configurable mail template must be configured. This text file is the body of the mail sent to the corresponding person. The default mail template is as follows:
 +
<pre>
 +
Sehr geehrter Seon-Nutzer,
 +
 +
Ihr Seon-Auftrag $/Seon_job/job_information/job_number wurde erfolgreich transferiert. Anbei der zugehoerige Lieferschein.
 +
 +
MfG
 +
Seon
 +
</pre>
 +
 +
As you can see, a variable is contained in this template. You can use as many variables as you want, the plugin will replace them with the content of the variables. All variables are indicated by a dollar sign "<code>$</code>" (as in shell scripts). The end of the variable name is a whitespace, tab or end of text. The variable itself is an XPath expression, i.e.:
 +
/Seon_job/job_information/job_number
 +
This XPath information is executed on the configured XML (either actual or initial one, see above).

Revision as of 11:40, 20 August 2013

Summary

The plugin "seonplugin_transmission_pdf" dynamically creates a PDF file containing information about an Seon job (like sender, recipient, meta information and files). It optionally sends this PDF file as an email to the corresponding person (see below for details).

"Corresponding person"

In this documentation, a "corresponding person" is often noted. This person is:

  • outgoing jobs: the sender
  • incoming jobs: the recipient

of the Seon job. All data extracted person are being used.

Configuration

This plugin is highly configurable. There are mainly two topics covered which are configurable:

  • layout (text and graphics)
  • behaviour

TransmissionPDF preview.png

Layout configuration

You can configure the following entities of the created PDF:

  • The logo (PNG and JPEG files are supported)
  • Header lines. If not configured (or configured to an empty string), the values are calculated dynamically by the person's data (line 1:company name, line2: location information, line 3: person's telephone and/or fax number)
  • Page title text
  • Language for all labels ("de" for german, "en" for english" version supported)
  • An optional footer text, two lines max.

In any textual situation, it's your responsability to check if the text fits into the line.

Behaviour configuration

  • Use initial state instead of actual state: Filenames will be extracted from the initial XML of the job. This has advantages of you're using plugins such as TAR or ZIP creation plugins which use technical temporary filenames. File sizes and contents will be first checked at the position of the original state, as a fallback in the configured job directory (set by the filemove plugin).
  • Render unknown filesizes: If no filesize is retrievable, a text block will be added stating that the size is not known.
  • Analyze archive files: Known archive files (which are ZIP, TAR and gzip'ed TAR archives) will be scanned for the contained filenames and sizes. The content of these archives are also listed in the PDF per file. The mechanism is non-recursive.
  • Disable mail sending: If enabled, no mail will be sent to the corresponding person.
  • Debug mail execution: Mail sending might not work if not configured properly, so all commands which are used for mail transmission are logged in the plugin logs.

Templating

A configurable mail template must be configured. This text file is the body of the mail sent to the corresponding person. The default mail template is as follows:

Sehr geehrter Seon-Nutzer,

Ihr Seon-Auftrag $/Seon_job/job_information/job_number wurde erfolgreich transferiert. Anbei der zugehoerige Lieferschein.

MfG
Seon

As you can see, a variable is contained in this template. You can use as many variables as you want, the plugin will replace them with the content of the variables. All variables are indicated by a dollar sign "$" (as in shell scripts). The end of the variable name is a whitespace, tab or end of text. The variable itself is an XPath expression, i.e.:

/Seon_job/job_information/job_number

This XPath information is executed on the configured XML (either actual or initial one, see above).