An on-machine printing system for a spatial filter has been developed to detect small particles on the memory-mat of a 0.3 μm LSI. A minicopy film is used for the base of spatial filters. A pattern on the filter is printed by a thermal head using a ribbon painted with ink of synthetic resin. The maximum size of the printed spatial filter is 16 × 16 mm. The transmission factors of printed and transparent parts are 0.92% and 92% respectively. The printing time is 5 seconds. The signal obtained at memory-mat decreases to 4% using this spatial filter and 0.6 μm standard particles are detected at an SN ratio of 3.