Printtopdf needs form open for matrix

printtopdf prints a blank matrix unless the form is open.