Difference between revisions of "Seon plugin seonplugin transmission pdf"

From Seon
Jump to: navigation, search
(Mail templating)
(Mail templating)
Line 56: Line 56:
 
  Seon Transfer-PDF - Auftrag $/Seon_job/job_information/job_number (gesendet an Fa. $/Seon_job/job_information/recipient/partner_longname)
 
  Seon Transfer-PDF - Auftrag $/Seon_job/job_information/job_number (gesendet an Fa. $/Seon_job/job_information/recipient/partner_longname)
  
=== Mail content ====
+
=== Mail content ===
 
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:
 
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>
 
<pre>

Revision as of 11:48, 2 September 2014

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).

After successful execution of this plugin, the created PDF will be saved in

If the saved PDF file is readable, the button "Print" is being enabled in Seon Webaccess of this job.

"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). Beware of big logo images, even if the compressed PNG or JPEG file is small. PDF saves the content not that good compressed (but compressed anyway). Verify if a smaller filesize is better for you. The logo will be added on each page, so PDF filesize will be multiplied by the amount of pages by the size of this image.
  • 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.

Mail templating

Several configurations about the mail behaviour are available. These are divided into:

Mail sender

The sender of the mail (passed to the MTA) is configurable. The default value is: "Seon <seon>". The configurative value can include XPath expressions, indicated by a single dollar sign ("$").

A productive example could be:

$/Seon_job/job_information/sender/name $/Seon_job/job_information/sender/surname <$/Seon_job/job_information/sender/email_address>

Mail subject

The subject of the mail (passed to the MTA) is configurable. The default value is:

  • english language: Seon transmission PDF
  • german language: Seon Transfer-PDF

The configurative value can include XPath expressions, indicated by a single dollar sign ("$").

A productive example could be:

Seon Transfer-PDF - Auftrag $/Seon_job/job_information/job_number (gesendet an Fa. $/Seon_job/job_information/recipient/partner_longname)

Mail content

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).