fixed PDF writer problem