Transpromo

Top Previous Topic Next Topic  Print this topic

This extension enables adding Transpromo or transpromotional content to documents generated with XF Rendering Server 2013. The term "transpromotional" refers to the merging of promotional content and transactional print pieces and is a technique companies can use to add promotion or even advertising onto existing transaction-related documents, such as statements, invoices, or bills.

 

The extension that XF Rendering Server 2013 uses to implement Transpromo is xf:trans-promo. It can reside as a "child" of fo:page-sequence.

 

The following attributes are supported:

 

·all fo:external-graphic attributes will need to be prefixed with the fo namespace to be recognized correctly. Example: fo:src, fo:content-width, fo:content-height, fo:scaling
·all fo:external-graphic extensions will not need any prefix as they are already in the xf namespace: filter, no-clip, compat-id, scaling-reference
·page-constraint - transpromo content will appear only on pages that satisfy this constraint. Possible values are: "any" (default, no constraint applied), "odd", "even", "first", "last"
·alignment-constraint - transpromo content will appear only on the side of the page satisfying this constraint. Possible values are: "none" (default, no constraint applied), "top", "bottom", "center", "left", "right"
·column-constraint - transpromo content will be constrained into appearing only on a specific column, given by its index. The default value is "-1", meaning no constraint is applied, positive values indicate one of the columns: "0" for the first column, "1" for the second, etc.
·region-constraint - transpromo content will be constrained into appearing only on a specific region, determined by its name. The default value is an empty string, meaning that no constraint is applied.
·rect-constraint - - transpromo content will not exceed the boundaries of the rectangle defined. The generic form is rect(X, Y, Width, Height), where X, Y, Width and Height are floating point numbers which give the rectangle's coordinates in pixels.
·rule - the rule to be satisfied in order for the transpromo content to be displayed. Possible values are: "none" (default, this transpromo will appear whenever possible) and "FIND_KEYWORD(StringToFind)" (this transpromo will be displayed only if StringToFind appears in the page).

 

Example of usage:

 

 

<?xml version="1.0" encoding="utf-8"?>

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xf="http://www.ecrion.com/xf/1.0" xmlns:xc="http://www.ecrion.com/2008/xc" xmlns:svg="http://www.w3.org/2000/svg" font-family="Times" font-size="12pt">

       <fo:layout-master-set>

               <fo:simple-page-master master-name="Letter Page" page-width="8.5in" page-height="5in" xf:auto-adjust-regions="false">

                       <fo:region-body region-name="xsl-region-body" margin="0.9in"/>

                       <fo:region-before region-name="xsl-region-before" display-align="after" extent="0.9in"/>

                       <fo:region-after region-name="xsl-region-after" extent="0.9in"/>

                       <fo:region-start region-name="xsl-region-start" extent="0.9in"/>

                       <fo:region-end region-name="xsl-region-end" extent="0.9in"/>

               </fo:simple-page-master>

       </fo:layout-master-set>

       <fo:page-sequence master-reference="Letter Page">

               <xf:trans-promo fo:src="D\images\image.png" page-constraint="first" alignment-constraint="left" region-constraint="xsl-region-before" rule="FIND_KEYWORD(Text)"/>

               <fo:static-content flow-name="xsl-region-before">

                       <fo:block> </fo:block>

               </fo:static-content>

               <fo:static-content flow-name="xsl-region-after">

                       <fo:block> </fo:block>

               </fo:static-content>

               <fo:static-content flow-name="xsl-region-start">

                       <fo:block> </fo:block>

               </fo:static-content>

               <fo:static-content flow-name="xsl-region-end">

                       <fo:block> </fo:block>

               </fo:static-content>

               <fo:flow flow-name="xsl-region-body">

                       <fo:block>Text here</fo:block>

               </fo:flow>

       </fo:page-sequence>

</fo:root>

 

 

 

Output:

 

transpromo