fixed issue with pdf erroring out.

Signed-off-by: Chris Jones <chris@jonezy.org>