By default, PDF exports are named PDF Export.pdf.
To configure the filename, change the content of the <title> element of the pdf-template.vm file.
For example:
The following example checks if a document has the Version metadata key with a value of Latest.
<title>
#if($metadata["Version"] != "Latest")
#set($title = "$pbk-title $metadata['Version'] $metadata['audience']")
$title.toLowerCase().replace(" ", "_")
#else
$pbk-title.toLowerCase().replace(" ", "_")
#end
</title>
| Condition | Filename | Example |
|---|---|---|
| True | The name of the document ($pbk-title) in lowercase, with all spaces replaced by underscores. |
The Latest version of the Fluid Topics Configuration and Administration Guide becomes fluid_topics_configuration_and_administration_guide.pdf. |
| False | The name of the document ($pbk-title), followed by the value of the Version metadata key, followed by the value of the audience metadata key. The combination of the three elements is in lowercase, with all spaces replaced by underscores. |
The 4.1 version, with audience internal, of the Fluid Topics Configuration and Administration Guide becomes fluid_topics_configuration_and_administration_guide_4.1_internal.pdf. |