/* Print a series of receipts containing i18n example strings - Code below shouldn't need changing */ $printer = new Escpos($connector, $profile); $codePages = $profile->getSupportedCodePages(); $first = true; // Print larger table for first code-page. foreach ($codePages as $table => $name) { /* Change printer code page */ $printer->selectCharacterTable(255); $printer->selectCharacterTable($table); /* Select & print a label for it */ $label = $name; if ($name === false) { $label = " (not matched to iconv table)"; } $printer->setEmphasis(true); $printer->textRaw("Table {$table}: {$label}\n"); $printer->setEmphasis(false); if ($name === false && !$verbose) { continue; // Skip non-recognised } /* Print a table of available characters (first table is larger than subsequent ones */ if ($first) { $first = false; compactCharTable($printer, 1, true); } else { compactCharTable($printer); } } $printer->cut(); $printer->close();