Exd/scripts/demo.pl

31 lines
505 B
Perl
Raw Normal View History

#!/usr/bin/env perl
use v5.40.0;
use strict;
use warnings;
use Exd::Printer;
use Exd::DeviceToImage;
use Exd::DeviceToRawFile;
2024-10-11 18:43:49 +02:00
use Exd::DeviceToBluetooth;
use Exd::Utils;
2024-10-13 02:20:45 +02:00
my $device =
Exd::DeviceToRawFile->new( output_file => '/dev/usb/lp0' );
my $printer = Exd::Printer->new( device => $device );
my $pid = fork;
if (!$pid) {
$printer->print_text(
[
'hola mundo'
],
30
);
$printer->print_n_lf(4);
$printer->print;
exit 0;
}
2024-10-13 02:20:45 +02:00
waitpid $pid, 0;