Fix PDF generation in the AGPL project

Change-Id: Ifb7cab4202d6df0963d10580e9d9a87f8e6d2518