Printing to PDF crashes program

The program crashes when printing to PDF in model space.