I get your problem now. If you set the scan size on the device to a fixed size of letter instead of auto detect does it produce the right size without the extra length? If it does, maybe just set the program key for that setting. That way regular scans will be auto detect.