Would this Python/PDF handling library be useful to you: <http://www.boddie.org.uk/david/Projects/Python/pdftools/> I don't think it specifically handles re-writing, but it might be a useful starting point. --Phil.