I want to print label in a Laravel view with data which is coming dynamically. I want to use LabelWriter 450 for this purpose
width: 89mm; height: 41mm;
How can i do that?
I tried the following code but it opens full page for printing, not according to size.
Код: Выделить всё
@media print { body * { visibility: hidden; } .label, .label * { visibility: visible; } .label { width: 89mm; height: 41mm; } } Print Order ID: {{ $repair->id }} Client ID: {{ $repair->user->id }}
Order Date: {{ $repair->created_at->format('Y-m-d') }}
Fault: {{ $repair->selected_issues }}
Pin/Password: {{ $repair->password }}
Authorize For Reset: {{ !empty($repair->authorization) ? 'Yes' : 'No' }}
function printLabel() { window.print(); } What should i try now to print with specific width and height?
Источник: https://stackoverflow.com/questions/781 ... in-laravel
Мобильная версия