- driver->version = new ppdcString(attr ? attr->value : NULL);
- driver->model_number = ppd->model_number;
- driver->manual_copies = ppd->manual_copies;
- driver->color_device = ppd->color_device;
- driver->throughput = ppd->throughput;
+ driver->version = new ppdcString(attr ? attr->value : NULL);
+ driver->model_number = ppd->model_number;
+ driver->manual_copies = ppd->manual_copies;
+ driver->color_device = ppd->color_device;
+ driver->throughput = ppd->throughput;
+ driver->variable_paper_size = ppd->variable_sizes;
+ driver->max_width = ppd->custom_max[0];
+ driver->max_length = ppd->custom_max[1];
+ driver->min_width = ppd->custom_min[0];
+ driver->min_length = ppd->custom_min[1];
+ driver->left_margin = ppd->custom_margins[0];
+ driver->bottom_margin = ppd->custom_margins[1];
+ driver->right_margin = ppd->custom_margins[2];
+ driver->top_margin = ppd->custom_margins[3];
+
+ for (i = 0; i < ppd->num_filters; i ++)
+ {
+ strlcpy(line, ppd->filters[i], sizeof(line));
+
+ for (ptr = line; *ptr; ptr ++)
+ if (isspace(*ptr & 255))
+ break;
+ *ptr++ = '\0';
+
+ cost = strtol(ptr, &ptr, 10);
+
+ while (isspace(*ptr & 255))
+ ptr ++;
+
+ filter = new ppdcFilter(line, ptr, cost);
+ driver->add_filter(filter);
+ }