How to reduce the size of a scanned file