pstrcpy(print_directory, pjob->filename); p = strrchr(print_directory,'/'); if (!p) return 0; *p++ = 0; if (chdir(print_directory) != 0) return 0; pstrcpy(jobname, pjob->jobname); pstring_sub(jobname, "'", "_"); slprintf(job_page_count, sizeof(job_page_count)-1, "%d", pjob->page_count); slprintf(job_size, sizeof(job_size)-1, "%d", pjob->size); /* send it to the system spooler */ ret = print_run_command(snum, lp_printcommand(snum), NULL, "%s", p, "%J", jobname, "%f", p, "%z", job_size, "%c", job_page_count, NULL); --------------------------------------------------------------- I'm confused about what %J holds.