Are we corrupting the original PDF data here? Does it make sense to do inversion on copy only?