OpenVAS: PDF report insert head an foot

My first attempt to modify a pdf report can be found here: CUSTOMIZING PDF-REPORTS

In the next step, I want to insert headers and footers.

For this reason, I have cloned the original report and modified it. This article describes the procedure

Clone existing PDF report


Then the new report can be renamed. Important is the ID to find the associated files on the server


Cloned reports are in the directory

In my case in the subdirectory 33d5569b-c2f6-4455-9cc1-4a9bf0d35879.

Modify the new latex.xsl

First a security copy of the xsl file

root@sv-openvas /usr/local/var/lib/openvas/openvasmd/report_formats/2fc54359-0c7e-4e03-b00b-2479f7354f06/33d5569b-c2f6-4455-9cc1-4a9bf0d35879 # cp latex.xsl latex.xsl.orig

The xsl file is relatively large, but can be edited with notepad++ quite comfortably. To understand the structure of the report, take a look at the end of the file.

 <!-- The actual report. -->
 <xsl:template name="real-report">
 <xsl:call-template name="header"/>
 <xsl:call-template name="newline"/>
 <xsl:text>\begin{document}</xsl:text><xsl:call-template name="newline"/>
 <xsl:call-template name="newline"/>
 <xsl:text>\maketitle</xsl:text><xsl:call-template name="newline"/>
 <xsl:call-template name="abstract"/>
 <xsl:call-template name="toc"/>
 <xsl:call-template name="newline"/>
 <xsl:call-template name="results-overview"/>
 <xsl:call-template name="results-per-host"/>

The report consists of a header, an abstract, a table of contents, an overview of results and detailed results per host.

The necessary commands I inserted in the template with the name header. In addition to the already used package graphicx, now additional fancyhdr is used. The logo must also be in the corresponding directory.

fancyfoot and fancyheader can be used with 3 options:

  • L = left
  • R = right
  • C = center
%Head and foot
\fancyhead[L]{Vertraulich - Stadtverwaltung Neustadt an der Weinstraße}
\fancyfoot[R]{Seite \thepage}
\fancyfoot[L]{Der Bericht wurde mit OpenVAS generiert.}}

The headline now looks like this:


And here the footer



2 thoughts on “OpenVAS: PDF report insert head an foot

  1. Hi,
    Thank you so much for this tutorial! You saved me days of work 🙂
    I’ve got a shiny logo, and header+footer on my first page now, thanks to you.
    I also changed to a much nicer font with the command:


    However, only the first page of my report was modified with the header/footer.
    Do you know how to apply them to the whole document?



    Liked by 1 person

    1. search for the section “Section with Results per Host” and insert the lines:

      \fancyhead[L]{Vertraulich – Stadtverwaltung Neustadt an der Weinstraße}
      \fancyfoot[R]{Seite \thepage}


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s