Untitled

mail@pastecode.io avatar
unknown
php_laravel_blade
9 months ago
1.1 kB
4
Indexable
Never
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Print Barcode</title>
</head>
<body>
<style>
	html, body{
		padding : 0;
		margin: 0;
	}
	.item {
		width: 60mm;
		height: 20mm;
		border: 1px solid black;
		overflow: hidden;
		padding-top: 3.5mm;
	}
	.item img {
    width: 100%;
    height: 100%;
    object-fit: fill;
	}
	
</style>

@foreach( $batch_barcode_detail as $item )
	@if( file_exists('./public/'.$item->barcode.'.png') )
		<div class="item">
			<img style="width: 100%;height: 100%;" src="{{asset('/public/'.$item->barcode.'.png')}}">
		</div>
	@else
	<div class="item">
		<img style="width: 100%;display:none;" src="{{asset('/public/barcode.php?text='.$item->barcode.'&print=true&size=70&codetype=code128&filepath='.$item->barcode.'.png')}}">
		<img style="width: 100%;height: 100%;" src="{{asset('/public/barcode.php?text='.$item->barcode.'&print=true&size=70&codetype=code128')}}">
	</div>
	@endif
@endforeach

</body>
</html>