document compile