cAddPrintjob vs. cPrintFile

Hello,


I am using both of these methods (cAddPrintjob and cPrintFile in a function. Whenever the input file is a JPG file, it picks cAddPrintjob and it works pretty well, but when the input file is a XLS file, it picks cPrintFile and it hangs.

All other settings, including file names and path are exactly the same. I searched the forum and it seems that people have had problems with permission settings and corrupted temp files. however, I guess those do not apply in my case because JPG files are printed flawlessly.

Does anybody know what could be wrong with cPrintFile in my function?

Thanks and regards,
Soroush