Document Mechanics