<?php

namespace Sideso\QzLaravel;

use Mike42\Escpos\Printer;
use Sideso\QzLaravel\QzConnector;

class QzPrinter extends Printer {


    public function __construct() {
        parent::__construct(connector: (new QzConnector()), profile: null);
        $this->selectCharacterTable(2); //Multilenguaje
        $this->feed();

    }

    public function getBuffer(): array
    {
        return $this->connector->getData();
    }

    public function getJsonData(): string
    {
        return json_encode($this->connector->getData(), JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES);
    }
    
}