Photolithography is the prevalent microfabrication technology. It needs to meet resolution and yield demands at a cost that makes it economically viable. However, conventional far-field photolithography has reached the diffraction limit, which imposes complex optics and short-wavelength beam source to achieve high resolution at the expense of cost efficiency. Here, we present a cost-effective near-field optical printing approach that uses metal patterns embedded in a flexible elastomer photomask with mechanical robustness. This technique generates sub-diffraction patterns that are smaller than 1/10th of the wavelength of the incoming light. It can be integrated into existing hardware and standard mercury lamp, and used for a variety of surfaces, such as curved, rough and defect surfaces. This method offers a higher resolution than common light-based printing systems, while enabling parallel-writing. We anticipate that it will be widely used in academic and industrial productions.