text("Hello world!\n"); $printer -> cut(); // Get the data out as a string $data = $connector -> getData(); // Return it, check the manual for specifics. header('Content-type: application/octet-stream'); header('Content-Length: '.strlen($data)); echo $data; // Close the printer when done. $printer -> close();