17 #include <cups/cups.h> 41 fprintf(stderr,
"DEBUG: cab Printer - Start - Dumping page header ...\n");
43 fprintf(stderr,
"DEBUG: AdvanceDistance = %u\n", header->AdvanceDistance);
44 fprintf(stderr,
"DEBUG: AdvanceMedia = %d\n", header->AdvanceMedia);
45 fprintf(stderr,
"DEBUG: Collate = %d\n", header->Collate);
46 fprintf(stderr,
"DEBUG: CutMedia = %d\n", header->CutMedia);
47 fprintf(stderr,
"DEBUG: Duplex = %d\n", header->Duplex);
48 fprintf(stderr,
"DEBUG: HWResolution = [ %u %u ]\n", header->HWResolution[0], header->HWResolution[1]);
49 fprintf(stderr,
"DEBUG: ImagingBoundingBox = [ %u %u %u %u ]\n", header->ImagingBoundingBox[0], header->ImagingBoundingBox[1], header->ImagingBoundingBox[2], header->ImagingBoundingBox[3]);
50 fprintf(stderr,
"DEBUG: InsertSheet = %d\n", header->InsertSheet);
51 fprintf(stderr,
"DEBUG: Jog = %d\n", header->Jog);
52 fprintf(stderr,
"DEBUG: LeadingEdge = %d\n", header->LeadingEdge);
53 fprintf(stderr,
"DEBUG: ManualFeed = %u\n", header->ManualFeed);
54 fprintf(stderr,
"DEBUG: Margins = [ %u %u ]\n", header->Margins[0], header->Margins[1]);
56 fprintf(stderr,
"DEBUG: MediaClass = \"%s\"\n", header->MediaClass);
57 fprintf(stderr,
"DEBUG: MediaColor = \"%s\"\n", header->MediaColor);
58 fprintf(stderr,
"DEBUG: MediaPosition = %u\n", header->MediaPosition);
59 fprintf(stderr,
"DEBUG: MediaType = \"%s\"\n", header->MediaType);
60 fprintf(stderr,
"DEBUG: MediaWeight = %u\n", header->MediaWeight);
62 fprintf(stderr,
"DEBUG: MirrorPrint = %d\n", header->MirrorPrint);
63 fprintf(stderr,
"DEBUG: NegativePrint = %d\n", header->NegativePrint);
64 fprintf(stderr,
"DEBUG: NumCopies = %u\n", header->NumCopies);
65 fprintf(stderr,
"DEBUG: Orientation = %d\n", header->Orientation);
66 fprintf(stderr,
"DEBUG: OutputFaceUp = %d\n", header->OutputFaceUp);
67 fprintf(stderr,
"DEBUG: OutputType = \"%s\"\n", header->OutputType);
68 fprintf(stderr,
"DEBUG: PageSize = [ %u %u ]\n", header->PageSize[0], header->PageSize[1]);
69 fprintf(stderr,
"DEBUG: Separations = %d\n", header->Separations);
70 fprintf(stderr,
"DEBUG: TraySwitch = %d\n", header->TraySwitch);
71 fprintf(stderr,
"DEBUG: Tumble = %d\n", header->Tumble);
73 fprintf(stderr,
"DEBUG: cupsBitsPerColor = %u\n", header->cupsBitsPerColor);
74 fprintf(stderr,
"DEBUG: cupsBitsPerPixel = %u\n", header->cupsBitsPerPixel);
75 fprintf(stderr,
"DEBUG: cupsBytesPerLine = %u\n", header->cupsBytesPerLine);
76 fprintf(stderr,
"DEBUG: cupsColorOrder = %d\n", header->cupsColorOrder);
77 fprintf(stderr,
"DEBUG: cupsColorSpace = %d\n", header->cupsColorSpace);
78 fprintf(stderr,
"DEBUG: cupsCompression = %u\n", header->cupsCompression);
79 fprintf(stderr,
"DEBUG: cupsHeight = %u\n", header->cupsHeight);
80 fprintf(stderr,
"DEBUG: cupsMediaType = %u\n", header->cupsMediaType);
81 fprintf(stderr,
"DEBUG: cupsNumColors = %u\n", header->cupsNumColors);
82 fprintf(stderr,
"DEBUG: cupsPageSizeName = %s\n", header->cupsPageSizeName);
83 fprintf(stderr,
"DEBUG: cupsPageSize [ %f %f ]\n", header->cupsPageSize[0], header->cupsPageSize[1]);
84 fprintf(stderr,
"DEBUG: cupsRowCount = %u\n", header->cupsRowCount);
85 fprintf(stderr,
"DEBUG: cupsRowFeed = %u\n", header->cupsRowFeed);
86 fprintf(stderr,
"DEBUG: cupsRowStep = %u\n", header->cupsRowStep);
87 fprintf(stderr,
"DEBUG: cupsWidth = %u\n", header->cupsWidth);
89 fprintf(stderr,
"DEBUG: cab - End - Dumping page header ...\n");
111 ppd_option_t *ppd_option;
112 ppd_choice_t *choice;
115 fprintf(stderr,
"DEBUG: Dump - Starting ...\n");
117 ppd_option = ppdFindOption(ppd, option);
119 if (ppd_option != NULL)
121 fprintf(stderr,
"DEBUG: cab - Option: ");
122 fprintf(stderr,
"%s", ppd_option->text);
123 fprintf(stderr,
"\n");
125 for (j = 0; j < ppd_option->num_choices; j++)
127 choice = &(ppd_option->choices[j]);
128 fprintf(stderr,
"DEBUG: cab - Choice-Text: ");
129 fprintf(stderr,
"%s", choice->text);
130 fprintf(stderr,
" -> %d", choice->marked);
132 if (choice->marked == 0)
134 fprintf(stderr,
" - is not marked ...");
138 fprintf(stderr,
" - marked!!!");
140 fprintf(stderr,
"\n");
145 fprintf(stderr,
"ERROR: cab -Dump - Option is not available ...\n");
148 fprintf(stderr,
"ERROR: cab - Dump - Done ...\n");
169 void dump_cups_options (
int num_options, cups_option_t *options)
173 fprintf(stderr,
"DEBUG: cab - Number of options: %d\n", num_options);
174 fputs(
"DEBUG: .........................................\n", stderr);
176 for (j = 0; j < num_options; j++)
178 fprintf(stderr,
"DEBUG: cab - Number of option: %d - ", j);
179 fputs(options[j].name, stderr);
180 fputs(
" - ", stderr);
181 fputs(options[j].value, stderr);
184 fputs(
"DEBUG: ......... +++ Cups option done +++ ..........\n", stderr);
203 void dump_cab_page_info (cups_page_header2_t *header)
205 fprintf(stderr,
"DEBUG: cab - --------------\n");
206 fprintf(stderr,
"DEBUG: Bilddaten ...\n");
207 fprintf(stderr,
"DEBUG: Height: %u\n", header->cupsHeight);
208 fprintf(stderr,
"DEBUG: Width: %u\n", header->cupsWidth);
209 fprintf(stderr,
"DEBUG: BitsPerColor: %u\n", header->cupsBitsPerColor);
210 fprintf(stderr,
"DEBUG: BitsPerPixel: %u\n", header->cupsBitsPerPixel);
211 fprintf(stderr,
"DEBUG: BytePerLine: %u\n", header->cupsBytesPerLine);
212 fprintf(stderr,
"DEBUG: Compression: %u\n", header->cupsCompression);
213 fprintf(stderr,
"DEBUG: cab - -------------- \n");
214 fprintf(stderr,
"DEBUG: PageSize = [ %u %u ]\n", header->PageSize[0], header->PageSize[1]);
215 fprintf(stderr,
"DEBUG: HWResolution[0]: %u\n", header->HWResolution[0]);
216 fprintf(stderr,
"DEBUG: HWResolution[1]: %u\n", header->HWResolution[1]);
217 fprintf(stderr,
"DEBUG: cab - -------------- \n");
void dump_ppd_option(ppd_file_t *ppd, char *option)
Dumps a printer option described in the related PPD.
void dump_pg_header(cups_page_header2_t *header)
Dumps the CUPS page header structure.