Domain Exception Error #7
Replies: 4 comments 7 replies
-
Please, provide code that cause this error. |
Beta Was this translation helpful? Give feedback.
-
public function test_print(){
$printer_ip = env('PRINTER_IP');
$label_width = env('LABEL_WIDTH');
$label_height = env('LABEL_HEIGHT');
$text_x_axis = env('TEXT_X_AXIS');
$text_y_axis = env('TEXT_Y_AXIS');
$text = env('TEXT');
$text_font = env('FONT_TEXT');
$text_size = env('TEXT_SIZE');
$text_box_width = env('TEXT_BOX_WIDTH');
$text_box_height = env('TEXT_BOX_HEIGHT');
$text_box_border = env('TEXT_BOX_BORDER');
$barcode_x_axis = env('BARCODE_X_AXIS');
$barcode_y_axis = env('BARCODE_Y_AXIS');
$barcode_data = env('BARCODE_DATA');
$barcode_type = env('BARCODE_TYPE');
$barcode_height = env('BARCODE_HEIGHT');
$label = Label::create(Unit::MM(), $label_width, $label_height)
->charset(Charset::UTF8())
->add(Element::textBlock($text_x_axis, $text_y_axis, $text, $text_font, $text_size)->box($text_box_width, $text_box_height, $text_box_border)->anchor(Anchor::CENTER()))
->add(Element::barcode($barcode_x_axis, $barcode_y_axis, $barcode_data, $barcode_type)->height($barcode_height));
(new Printer(new NetworkConnector($printer_ip)))->print($label);
return redirect()->back()->with('execute','Test print function executed');
} this is the code, all code same as in readme but i change it to variable. |
Beta Was this translation helpful? Give feedback.
-
Use this (new Printer(new NetworkConnector($printer_ip), Compiler::create(new Fingerprint())))->print($label); |
Beta Was this translation helpful? Give feedback.
-
There are some few error appear after use code *new Fingerprint(2) for this one i just put the value for dummy and i don't know what value use for.Please correct me if there is a mistake. |
Beta Was this translation helpful? Give feedback.
-
Hi, i try to integrate with honeywell label printer and got error
local.ERROR: {"exception":"[object] (DomainException(code: 0): at /vendor/php-aidc/label-printer/src/Printer.php:37)
I already make connection between pc and printer, pc able to reach printer when browse printer IP.
Thanks for this great package!
Beta Was this translation helpful? Give feedback.
All reactions