KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

Rotate Barcode 90 degrees #3368

Closed Matt Jacobson opened this topic on on Nov 4 - 2 comments

Matt Jacobson commented on Nov 4

I'm working on a layout to export multiple records on a single page with a barcode. I'm wondering if it is possible to rotate the barcode 90° Current Format

Desired Format

Any advice would be greatly appreciated!

Sebastian Morales commented on Nov 5

The barcode library we use has not had rotation option yet but there is a CSS solution like this:

<style>
	.vertical_barcode {
		transform: rotate(-90deg);
		transform-origin: right, top;
		-ms-transform: rotate(-90deg);
		-ms-transform-origin: right, top;
		-webkit-transform: rotate(-90deg);
		-webkit-transform-origin: right, top;
	}
</style>
<div class="vertical_barcode">
	<?php
	\koolreport\barcode\BarCode::create(array(
		"format" => "html",
		"value" => "081231723897",
		"type" => "TYPE_CODE_128"
	));
	return;
	?>
</div> 

This will work for both web view and PDF cloud export, bar the normal export package which doesn't support CSS transform style.

Matt Jacobson commented on Nov 7

Awesome — thank you! I really appreciate it and always forget that I can do css manipulation when creating a PDF!

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
help needed
solved

BarCode