Exd/scripts/demo.pl

31 lines
505 B
Perl

#!/usr/bin/env perl
use v5.40.0;
use strict;
use warnings;
use Exd::Printer;
use Exd::DeviceToImage;
use Exd::DeviceToRawFile;
use Exd::DeviceToBluetooth;
use Exd::Utils;
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;
}
waitpid $pid, 0;