Added REST routes for documents. Added PDF generation. Added document inspector.