Version 5.7.12

# `AttachFile`

since version 3.1.1

Attach a file to the PDF. Can be used to attach a ZUGFeRD electronic invoice.

## Child elements

(none)

## Parent elements

`AtPageCreation`, `AtPageShipout`, `Case`, `Contents`, `ForAll`, `Layout`, `Loop`, `Otherwise`, `Record`, `SavePages`, `Section`, `Until`, `While`

## Attributes

`description` (text, optional)
  Textual description of the attached file (for the PDF viewer).
`filename` (text, optional)
  The name of the local file to be attached to the PDF.
`name` (text, optional, since version 3.7.3)
  Set the name of the attached file in the PDF document. Defaults to `factur-x.xml` if the attached file type is `ZUGFeRD invoice`.
`select` (XPath expression, optional, since version 3.7.2)
  The contents of the file. Alternative to reading a file from the hard-drive.
`type` (text)
  The type of the included file. Must be a mime type or `ZUGFeRD invoice`.

## Example

    <AttachFile filename="invoice.xml" description="A ZUGFeRD invoice." type="ZUGFeRD invoice"/>

    <AttachFile select="CrossIndustryDocument" description="A ZUGFeRD invoice." type="ZUGFeRD invoice"/>

## Info

Attaching a ZUGFeRD electronic invoice is available in the Pro plan.

#### On this page