Fix pdf generation

                        
| Q             | A    |
| ---           | ---  |
| Bug fix?      | y    |
| New feature?  | n    |
| BC breaks?    | n    |
| Deprecations? | n    |
| Tests pass?   | y    |
| Fixed tickets | #170 |
| License       | GPL  |
| Doc PR        |      |