A lithographic apparatus comprises an illumination system for providing a projection beam of radiation and a support structure for supporting a patterning device which impart the projection beam with a pattern in its cross-section. The patterning device has a non-flat critical dimension (CD) profile across its width. A projection system projects the patterned beam onto a target portion of a substrate. Dose variation device for varying the radiation dose across the width of the target portion compensates for the non-flat CD profile of the patterning device.