PDF Attachments

PDF format allows embedding any files into the PDF file. These files can be opened via the Document item ->File Attachments... inside Adobe Acrobat 6.0+ or Adobe Reader. To embed any file into the generated PDF document produced by Altsoft Xml2PDF, use the <altsoft:attachment> tag inside the XSL-FO declarations section.



   <!ELEMENT attachment EMPTY>
   <!ATTLIST attachment
       src CDATA #REQUIRED
       name CDATA #IMPLIED
       description CDATA #IMPLIED>

src - URI of the file to be attached;
name - attachment name to be used by Adobe Acrobat. By default this is just the local file name;
description - description of the file to be shown by Adobe Acrobat next to the attachment.

This tag must be the first level descendant of the <fo:declarations> element.

For example, to attach the source XSL-FO file to the output PDF document use the following declaration:

   <fo:declarations xmlns:altsoft="http://alt-soft.com/xml2pdf/extensions">
     <altsoft:attachement src="hello-world.fo" name="Source XSL-FO file" />