Nearest traficar inforations.
This commit is contained in:
@@ -109,13 +109,10 @@ class Main extends Controller
|
||||
// Header("Content-type: image/png");
|
||||
imagepng($output, $fileName, 9); //to print to screen
|
||||
|
||||
|
||||
$connector = new FilePrintConnector("/dev/usb/lp0");
|
||||
$printer = new Printer($connector);
|
||||
$img = EscposImage::load($fileName, false);
|
||||
$printer->bitImage($img);
|
||||
$this->paper->getPrinter()->bitImage($img);
|
||||
|
||||
$printer->feed(4);
|
||||
$this->paper->getPrinter()->feed(4);
|
||||
|
||||
return back();
|
||||
}
|
||||
@@ -152,13 +149,15 @@ class Main extends Controller
|
||||
return back();
|
||||
}
|
||||
|
||||
public function printNote($noteId){
|
||||
public function printNote($noteId)
|
||||
{
|
||||
$note = DB::table('note')->where('id', $noteId)->first();
|
||||
$this->paper->sendPrint($note->topic, $note->text, $note->icon);
|
||||
return $note;
|
||||
}
|
||||
|
||||
public function noteLast(){
|
||||
public function noteLast()
|
||||
{
|
||||
$note = DB::table('note')->orderBy('id', 'desc')->first();
|
||||
$this->printNote($note->id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user