MySource Matrix Developer

Main Content

Customising the Generated Coding Standards PDF

Introduction

Snoopy is able to generate a PDF file that describes the coding standards that it is checking for. The default format for this file is branded for the MySource Matrix CMS and will look out of place in your project. This guide will show you what parts of the PDF format can be changed to re-brand the generated coding standards PDF file.

Customising Colours

Snoopy allows you to customise a number of the colours that you see in the coding standards PDF file. The colours are defined in the /path/to/snoopy/pdf_generator/colours.xml file. This file contains a number of RGB values that define the text and fill colours used within the PDF file.

By playing around with the colour values in this file, you can change the generated PDF file from the default blue/grey theme (below, left) to something a little more... orange.

Coding standards greyCoding standards orange

Customising Branded Images

There are a few images that are used in the coding standards PDF file that you will want to change when using Snoopy for your own project. These images are branded with the MySource Matrix name and logo and appear on the cover page of the generated PDF.

The branded images are located in the /path/to/snoopy/pdf_generator/images directory.

The Document Title (title.jpg)

This image is used to present the title of the coding standards document. The default image is shown below.

Coding standards title image

Make sure that the background colour of the title image matches the background colour specified in the colours.xml file for the cover page. The background colour is defined in the cover_background tag of this file.

Product Logo (matrix_logo.jpg)

The product logo is displayed at the bottom of the cover page. The default image is shown below.

Coding standards product logo

For best results, the product logo should have a white background.

Customising Decorative Images

There are a number of images used within the coding standards PDF file that are not branded to the MySource Matrix CMS. You may wish to change these images to fit with changes you have made to the colour scheme of the document.

The decorative images are located in the /path/to/snoopy/pdf_generator/images directory.

Snoopy makes some assumptions about the size of decorative images when determining layout and formatting. Where possible, maintain the original dimensions of decorative images when changing their appearance.

Major Heading Arrow (heading_arrow.jpg)

This arrow is displayed before each major heading, such as the name of a coding standard. The default image is shown below.

Major heading arrow

Minor Heading Arrow (title_arrow.jpg)

This arrow is displayed before the name of each coding standard in the table of contents of the document. It is a smaller version of the major heading arrow. The default image is displayed below.

Minor heading arrow

Page Number Arrow (page_number_arrow.jpg)

This arrow is displayed before the page number at the bottom of each page in the coding standards PDF file, except the cover page. The default image is shown below.

Page number arrow

Remember to regenerate the Snoopy coding standards PDF file after making changes to any of the images or the colours.xml file.