Code-friendly document assembly