Digital Signatures

Top Previous Topic Next Topic  Print this topic

PDF signatures can be specified using the xf:signature annotation property. Referencing an annotation containing this property from a visible element will convert the referenced element to a visible PDF signature, while referencing it from the fo:root will just add an invisible signature.

 

Example of usage:

 

 

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

<fo:root xf:annotation-reference="7" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xf="http://www.ecrion.com/xf/1.0">

       <xf:annotation id="7">

               <xf:signature timestamp="06/17/2009" name="Jose Maria Gonzales" location="Granada, Spain" reason="Validacion" certificate-serial-number="01"/>

       </xf:annotation>

       <fo:layout-master-set>

               <fo:simple-page-master master-name="all-pages" page-width="8in" page-height="11in">

                       <fo:region-body region-name="xsl-region-body" column-gap="0.25in" padding-top="6pt" padding-left="6pt" padding-right="6pt" padding-bottom="6pt" margin-top="0.7in" margin-left="0.7in" margin-right="0.7in" margin-bottom="0.7in"/>

                       <fo:region-before region-name="xsl-region-before" display-align="after" extent="0.7in" padding-top="6pt" padding-left="0.7in" padding-right="0.7in" padding-bottom="6pt"/>

                       <fo:region-after region-name="xsl-region-after" display-align="before" extent="0.7in" padding-top="6pt" padding-left="0.7in" padding-right="0.7in" padding-bottom="6pt"/>

               </fo:simple-page-master>

               <fo:page-sequence-master master-name="default-sequence">

                       <fo:repeatable-page-master-reference master-reference="all-pages"/>

               </fo:page-sequence-master>

       </fo:layout-master-set>

       <fo:page-sequence master-reference="default-sequence">

               <fo:flow flow-name="xsl-region-body" font-size="12pt" font-family="Times">

                       <fo:block border="1pt solid red" xf:annotation-reference="7">Signed document</fo:block>

               </fo:flow>

       </fo:page-sequence>

</fo:root>

 

 

In this example, the reference on the fo:root will generate a singature and the block will become a visible clickable signature in the generated PDF file.

 

The following traits apply to the xf:signature annotation property: name, location, reason, title, certificate-serial-number, certificate-issuer, time-stamp.

 

See also the Managing Server Certificates section.