View default PDF template - Fluid Topics - 3.7

Fluid Topics Configuration and Administration Guide

Category
Reference Guides
Audience
public
Version
3.7

Fluid Topics provides a default PDF template in the form of a Velocity file named pdf-template.vm. This file contains HTML and CSS and uses the CSS Paged Media model to produce publication layouts.

It is only possible to configure custom headers, footers, and margin sizes when Fluid Topics delegates the generation of the default PDF templates to the server. This type of delegation is only available for downloading Personal books.

At any time, it is possible to select the Download default template link in the Templates administration interface to view or modify the default template.

By default, the pdf-template.vm file contains the following lines:

<!DOCTYPE html>
<html>
<head>
<title>PDF Export</title>
<meta name='author' content="$author">
<meta name='description' content="$description">
<meta name='keywords' content="$keywords">
<meta name='generator' content="$author-display-name">
<style type="text/css">
@page { /* all pages */
size: A4; /* size of the printer papersheet */
margin: 1.5cm 2cm; /* control the margin around the content */
padding: 1cm 0; /* space between the content and the margins */
font-family: Helvetica, sans-serif; /* font for the page components*/
font-size: 9pt;
line-height: 1.5;

@top-center { /* part of the ribbon at the top */
content: "$pbk-title"; /* title repetition in top of each page */
font-size: 8pt;
font-family: DejaVuSerif, serif;
width: 100%;
margin-bottom: 0;
color: #9d9d9c;
color: device-cmyk(0%, 0%, 0%, 50%);
}

@bottom-center { /* folio */
font-size: 7pt;
content: "Page " counter(page) " of " counter(pages);
color: #9d9d9c;
color: device-cmyk(0%, 0%, 0%, 50%);
}
}

@page:first { /* cover only */
@top-center {
content: "";
}

@bottom-center {
content: "Confidential - Copyright © Fluid Topics";
color: #9d9d9c;
color: device-cmyk(0%, 0%, 0%, 50%);
}*
}

body {
font-family: Helvetica, sans-serif; /* font for the content, aka the topics */
font-size: 9pt;
font-weight: 100;
line-height: 1.5;
color: #575756;
color: device-cmyk(0%, 0%, 0%, 80%);
}

a:link,
a:visited,
a:hover,
a:active {
text-decoration: none;
color: #60afbf;
color: device-cmyk(53%, 33%, 19%, 4%);

}

h1, h2, h3, h4, h5, h6 {
color: #000;
color: device-cmyk(100%, 100%, 100%, 100%);
}

[class^='pdf-header-lvl']:before,
[class*='pdf-header-lvl']:before {
font-family: Georgia, serif;
margin-right: 0.35cm;
color: #9d9d9c;
color: device-cmyk(0%, 0%, 0%, 50%);
}

.pdf-header-lvl1 {
font-family: Georgia, serif;
line-height: 1.2;
/* page-break-before: always; */ /* uncomment to create a new page for each topic of level 1 */
}

.pdf-header-lvl2 {
font-family: Georgia, serif;
line-height: 1.2;
}

.pdf-header-lvl3 {
font-family: Georgia, serif;
line-height: 1.2;
}

table {
border-color: #575756;
border-color: device-cmyk(0%, 0%, 0%, 80%);
}

th {
background-color: #575756;
background-color: device-cmyk(0%, 0%, 0%, 80%);
color: #fff;
color: device-cmyk(0%, 0%, 0%, 0%);
}

td {
border-color: #9d9d9c;
border-color: device-cmyk(0%, 0%, 0%, 50%);
border-left-style: dotted;
border-right-style: dotted;
}

tr:nth-child(odd) td { /* alternate cell's background color */
background-color: #eee;
background-color: device-cmyk(0%, 0%, 0%, 10%);
}

.topic-source {
display: none;
}

.cover img { /* cover logo or image */
width: 50%;
margin: 0 0 12cm 0;
}

.cover h1 { /* title of the book */
font-family: Georgia, serif;
font-weight: 100;
font-size: 30pt;
line-height: 1.1;
margin: 0 -2.2cm 1cm -2.2cm;
padding: 0 2.2cm;
color: #000;
color: device-cmyk(100%, 100%, 100%, 100%);
}

.cover .tenant-title { /* tenant title */
font-size: 16pt;
font-weight: 500;
line-height: 1;
}

.cover .author { /* author */
display: none;
}

.cover .date { /* date */
font-size: 12pt;
line-height: 1;
}

.toc h1 {
font-family: Georgia, serif;
}

.toc ol li:before {
color: #9d9d9c;
color: device-cmyk(0%, 0%, 0%, 50%);
}

</style>
</head>
<body>
<section class="cover">
<img src="logo.png" alt="Company"/>
<p class="tenant-title">$tenant-title</p>
<h1>$pbk-title</h1>
<p class="author">$author-display-name</p>
<p class="date">$formatted-date</p>
</section>

<!--
<section class="toc">
<h1>Table of contents</h1>
$outline
</section>
-->

<section class="topics">
$topics
</section>
</body>
</html>