Fix PDF print

This fix old wrong var names in the PDF writer.