added printDocument