summaryrefslogtreecommitdiff
path: root/cups
diff options
context:
space:
mode:
authorTill Kamppeter <till.kamppeter@gmail.com>2019-08-22 23:30:34 +0200
committerTill Kamppeter <till.kamppeter@gmail.com>2019-08-22 23:30:34 +0200
commit863d77f731c6144dcf139e06e64a857754d8327f (patch)
treec5d4d9109f19376bcc4b0c31091fccae0601e304 /cups
parent24478335925f891673160893513fac43b0334c48 (diff)
downloadghostpdl-863d77f731c6144dcf139e06e64a857754d8327f.tar.gz
"cups"/"pwgraster" output device: Produce more debug output
When building with CUPS_DEBUG now debug output for the process of matching the page geometry with the PPD file's page sizes is produced.
Diffstat (limited to 'cups')
-rw-r--r--cups/gdevcups.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/cups/gdevcups.c b/cups/gdevcups.c
index 1c7b99f8d..9f6732309 100644
--- a/cups/gdevcups.c
+++ b/cups/gdevcups.c
@@ -3548,6 +3548,21 @@ cups_put_params(gx_device *pdev, /* I - Device info */
if (score > 0)
best_size = size;
}
+#ifdef CUPS_DEBUG
+ dmprintf1(pdev->memory, "DEBUG2: Checking against PPD page size: %s\n",
+ size->name);
+ dmprintf2(pdev->memory, "DEBUG2: Width: %8.2f; Height: %8.2f\n",
+ size->width, size->length);
+ dmprintf4(pdev->memory, "DEBUG2: Margins: Left: %8.2f; Right: %8.2f; Top: %8.2f; Bottom: %8.2f\n",
+ size->left, size->right, size->top, size->bottom);
+ dmprintf4(pdev->memory, "DEBUG2: Size mismatch: Long Edge (%8.2f): %8.2f; Short Edge (%8.2f): %8.2f\n",
+ LONG_EDGE_LENGTH_MATCH_LIMIT, long_edge_mismatch,
+ SHORT_EDGE_LENGTH_MATCH_LIMIT, short_edge_mismatch);
+ dmprintf3(pdev->memory, "DEBUG2: Match: Name: %d; Size: %d; Margins: %d\n",
+ name_matched, size_matched, margins_matched);
+ dmprintf2(pdev->memory, "DEBUG2: Score: %ld; Best Score: %ld\n",
+ score, best_score);
+#endif /* CUPS_DEBUG */
}
if (best_size)
@@ -3670,6 +3685,21 @@ cups_put_params(gx_device *pdev, /* I - Device info */
if (score > 0)
best_size = size;
}
+#ifdef CUPS_DEBUG
+ dmprintf1(pdev->memory, "DEBUG2: Checking against PPD page size: %s\n",
+ size->name);
+ dmprintf2(pdev->memory, "DEBUG2: Width: %8.2f; Height: %8.2f\n",
+ size->width, size->length);
+ dmprintf4(pdev->memory, "DEBUG2: Margins: Left: %8.2f; Right: %8.2f; Top: %8.2f; Bottom: %8.2f\n",
+ size->left, size->right, size->top, size->bottom);
+ dmprintf4(pdev->memory, "DEBUG2: Size mismatch: Long Edge (%8.2f): %8.2f; Short Edge (%8.2f): %8.2f\n",
+ LONG_EDGE_LENGTH_MATCH_LIMIT, long_edge_mismatch,
+ SHORT_EDGE_LENGTH_MATCH_LIMIT, short_edge_mismatch);
+ dmprintf3(pdev->memory, "DEBUG2: Match: Name: %d; Size: %d; Margins: %d\n",
+ name_matched, size_matched, margins_matched);
+ dmprintf2(pdev->memory, "DEBUG2: Score: %ld; Best Score: %ld\n",
+ score, best_score);
+#endif /* CUPS_DEBUG */
}
if (best_size)