The secret formula is, well, secret. But in roughly speaking, the idea is to scan the first 100 lines of the printfile to see what the longest line is. (Not counting trailing blanks or //GDI commands.) If that length is greater than the first parameter to the CPP=x,y command, then it should set the pitch to y (compressed) value.
If you can capture a copy of the offending printfile, it should be easy enough to identify what the problem is. (If necessary send it to me, along with the printer init file.)