return (NULL);
}
+ pwgFormatSizeName(pc->custom_pwg_size, sizeof(pc->custom_pwg_size), "custom", /*name*/NULL, (int)w, (int)l, /*units*/NULL);
+
pc->custom_size.map.ppd = (char *)page_size;
+ pc->custom_size.map.pwg = pc->custom_pwg_size;
pc->custom_size.width = (int)w;
pc->custom_size.length = (int)l;
- if ((media = pwgMediaForSize((int)w, (int)l)) != NULL)
- pc->custom_size.map.pwg = (char *)media->pwg;
-
return (&(pc->custom_size));
}
/*
* Private PPD definitions for CUPS.
*
- * Copyright © 2020-2024 by OpenPrinting.
+ * Copyright © 2020-2025 by OpenPrinting.
* Copyright © 2007-2019 by Apple Inc.
* Copyright © 1997-2007 by Easy Software Products, all rights reserved.
*
custom_min_length; /* Minimum custom length in 2540ths */
char *custom_max_keyword, /* Maximum custom size PWG keyword */
*custom_min_keyword, /* Minimum custom size PWG keyword */
- custom_ppd_size[41]; /* Custom PPD size name */
+ custom_ppd_size[41], /* Custom PPD size name */
+ custom_pwg_size[128]; /* Custom PWG size name */
pwg_size_t custom_size; /* Custom size record */
char *source_option; /* PPD option for media source */
int num_sources; /* Number of media sources */
/*
* Not a standard size; convert it to a PWG custom name of the form:
*
- * custom_WIDTHxHEIGHTuu_WIDTHxHEIGHTuu
+ * [oe|om]_WIDTHxHEIGHTuu_WIDTHxHEIGHTuu
*/
if (keyword)
- pwgFormatSizeName(keyword, keysize, "custom", NULL, width, length, NULL);
+ pwgFormatSizeName(keyword, keysize, /*prefix*/NULL, NULL, width, length, NULL);
if (ppdname)
{