diff -up hplip-3.12.6/prnt/hpcups/HPCupsFilter.cpp.mucks-with-spooldir hplip-3.12.6/prnt/hpcups/HPCupsFilter.cpp
--- hplip-3.12.6/prnt/hpcups/HPCupsFilter.cpp.mucks-with-spooldir 2012-06-18 12:40:17.000000000 +0200
+++ hplip-3.12.6/prnt/hpcups/HPCupsFilter.cpp 2012-06-19 10:55:05.325913806 +0200
@@ -474,26 +474,6 @@ int HPCupsFilter::StartPrintJob(int arg
getLogLevel();
m_JA.job_id = atoi(argv[1]);
- FILE *fp;
- char dFileName[32];
- memset(dFileName, 0, sizeof(dFileName));
- m_JA.job_id = atoi(argv[1]);
- snprintf (dFileName, sizeof(dFileName), "/var/spool/cups/d%05d-001", m_JA.job_id);
- if ((fp = fopen (dFileName, "r")))
- {
- char line[258];
- for (int i = 0; i < 10; i++)
- {
- fgets (line, 256, fp);
- if (!strncmp (line, "%%Pages:", 8))
- {
- sscanf (line+9, "%d", &m_JA.total_pages);
- break;
- }
- }
- fclose (fp);
- }
-
m_ppd = ppdOpenFile(getenv("PPD"));
if (m_ppd == NULL) {
dbglog("DEBUG: ppdOpenFile failed for %s\n", getenv("PPD"));