pdf writeout