# Print Product Barcodes

**URL:** <https://www.dolibarr.org/forum/t/print-product-barcodes/22602>\
**Category:** Using my Dolibarr\
**Tags:** Products\
**Created:** [August 5, 2022, 4:35pm UTC](https://www.dolibarr.org/forum/t/print-product-barcodes/22602 "2022-08-05T16:35:53Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![hiltonmw](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/h/5fc32e/32.png) [@hiltonmw](https://www.dolibarr.org/forum/u/hiltonmw)\
**Post date:** [August 5, 2022, 4:35pm UTC](https://www.dolibarr.org/forum/t/print-product-barcodes/22602/1 "2022-08-05T16:35:54Z")

</div>

Just installed and setup the on-prem (Windows) version and I’m loving it so far.

Most of the other POS systems I’ve used have had an ability to print a barcode label either during stock take, or, at least on the product page, there’s usually a button to print the item label/barcode.

I don’t seem to see that here. The only thing I do see is the Tools \> Print Barcodes option.

Are there any other ways to print (and also customize what’s on them) product labels? Tried searching google and the forums… didn’t pull up much.

Thanks

---

<div class="post-metadata">

**Author:** ![RiseValInfotech](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/r/41988e/32.png) [@RiseValInfotech](https://www.dolibarr.org/forum/u/RiseValInfotech)\
**Post date:** [August 7, 2022, 7:20am UTC](https://www.dolibarr.org/forum/t/print-product-barcodes/22602/2 "2022-08-07T07:20:28Z")

</div>

Please check Setup \> modules/applications \> Barcode and click on settings wheel.

 ![image](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/c/cb410b4452709da69a879db4ab6a97eca3f971ff.png)

thanks  
yesbee

---

<div class="post-metadata">

**Author:** ![hiltonmw](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/h/5fc32e/32.png) [@hiltonmw](https://www.dolibarr.org/forum/u/hiltonmw)\
**Post date:** [August 7, 2022, 11:33pm UTC](https://www.dolibarr.org/forum/t/print-product-barcodes/22602/3 "2022-08-07T23:33:44Z")

</div>

thanks yesbee… i do have that installed…  
what I’m asking for is… on most other products, there’s a way, from the item/product screen to print the barcodes and also potentially configure them, to add things like pricing info, description info, etc.

I don’t seem to see that here. The only thing I seem to get is the ability on that screen to AFTER I put the part in, search the Tools \> Barcodes section in order to print individual labels.

---

<div class="post-metadata">

**Author:** ![MobileIT](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/m/9de053/32.png) [@MobileIT](https://www.dolibarr.org/forum/u/MobileIT)\
**Post date:** [August 17, 2022, 5:20pm UTC](https://www.dolibarr.org/forum/t/print-product-barcodes/22602/4 "2022-08-17T17:20:28Z")

</div>

HI. did you find a answer on this, I was hoping there is a solution,

---

<div class="post-metadata">

**Author:** ![DG-Rilling](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/d/e495f1/32.png) [@DG-Rilling](https://www.dolibarr.org/forum/u/DG-Rilling)\
**Post date:** [August 25, 2022, 3:30pm UTC](https://www.dolibarr.org/forum/t/print-product-barcodes/22602/5 "2022-08-25T15:30:58Z")

</div>

Hi,  
we have added this functionality, but it requires some changes in the source files.

We use Dolibarr in the cloud and the QR code is printed on a label printer connected to a print-server in our office.  
Therefore, our modification is special, but it may give some hints on how to solve the QR code printing problem.

In \htdocs\product\card.php we have added a new action “printbarcode” and a button that triggers this action.  
This action in turn finally triggers a URL with the print parameters.

…new action “printbarcode”:

```auto
	// Print QR-Code value
	if ($action == 'printbarcode') {
			$action = '';
			if (!$notrigger) {
			// Call trigger
				$result = $object->call_trigger('PRODUCT_PRINT_QR', $user);
				if ($result < 0) {
					$error++;
				}
			}	
			// End call triggers
			header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id);
			exit;
	}

```

…new button “Print QR-Code”:

```auto
		// barcode set and !empty and type=QR-Code
		if (isset($object->barcode) && ($object->barcode <> '') && $object->barcode_type == '8') {
			print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=printbarcode&id='.rawurlencode($object->id).'&token='.newToken().'">'.$langs->trans("Print QR-Code").'</a>';
		}

```

For this we copied the \htdocs\core\triggers\interface\_99\_modZapier\_ZapierTriggers.class.php and adapted it for my needs.  
As you can see, we have also added other actions for printing serial numbers from the MRP module.

```auto
		switch ($action) {
			case 'PRODUCT_PRINT_QR':
				$object->user = $user->accountancy_code;	// User Short
				$cleaned = cleanObjectDatas(dol_clone($object));
				$json = json_encode($cleaned);
				$type = 0;
				// call the QRCodePostWebhook() function
				QRCodePostWebhook($type, $obj['url'], $json);
				$logtriggeraction = true;
				break;
            // get lot/serial
			case 'PRODUCT_LOT_PRINT_QR':
			case 'MRP_LOT_PRINT_QR':
				$sql = 'SELECT pl.rowid, p.ref as `pref`, mp.fk_mo, mo.ref, pl.tms
					FROM '.MAIN_DB_PREFIX.'product_lot pl
					LEFT JOIN '.MAIN_DB_PREFIX.'mrp_production mp ON mp.batch = pl.batch 
					LEFT JOIN '.MAIN_DB_PREFIX.'mrp_mo mo ON mo.rowid = mp.fk_mo 
					LEFT JOIN '.MAIN_DB_PREFIX.'product p ON p.rowid = pl.fk_product 
					WHERE pl.batch = "'.$object->barcode.'"';
				$resqlC = $this->db->query($sql);
				$result = $this->db->fetch_array($resqlC);

				$object->user = $user->accountancy_code;	// User Short
				$cleaned = cleanObjectDatas(dol_clone($object));
				$cleaned->id = $result['rowid'];
				$cleaned->name = $result['ref']." (".$result['tms'].")";
				$cleaned->ref = $result['pref'];

				$json = json_encode($cleaned);
				$type = 2;
				// call the QRCodePostWebhook() function
				QRCodePostWebhook($type, $obj['url'], $json);
				$logtriggeraction = true;
				break;

            // some more cases followed but not shown here... 
        }

function QRCodePostWebhook($typ, $url, $json)
{
	$qr = json_decode($json);	// extrahiere parameter
	$curl = curl_init();
	switch($typ) {
		case 0:
            $fields = http_build_query(array(
            "typ" => "card",
            "pos1" => $qr->barcode,
            "pos2" => $qr->description,
            "pos3" => urldecode($qr->label),
            "pos4" => $qr->user,
			"ret" => $qr->id
            ));
            $url = "https://xxx.xxx.xxx.xxx/printQRCode_Doli.php?".$fields; 
			break;
		case 2:
             $fields = http_build_query(array(
             "typ" => "charge",
             "pos1" => $qr->barcode,
             "pos2" => $qr->ref,
             "pos3" => urldecode($qr->label),
             "pos4" => $qr->name,
			 "ret" => $qr->id
             ));
             $url = "http://xxx.xxx.xxx.xxx/printQRCode_Doli.php?".$fields;
			break;
	}

      curl_setopt($curl, CURLOPT_URL, $url);

	$request = "GET";
	curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_TIMEOUT, 5); //timeout in seconds
    $headers = array(
	   "accept: application/json",
	   "Content-Type: application/json",
	);
	curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $request);
	curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
	//for debug only!
	curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
	curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);

        $result = curl_exec($curl);

        if($result) {
            setEventMessages('Label mit QR-Code wurde gedruckt...', null, 'mesgs');
        } else {
            setEventMessages('Druck des QR-Code-Labels ist fehlgeschlagen...', null, 'errors');
        }    
	// Decode the result for debug
	$resultData = json_decode($result, true);
	curl_close($curl);
}

...

```

In the web interface it looks like this:

 ![qr1](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/8/84a12ce328a2437eb748960720245739df63c396.png)

From the MRP-Module:

 ![qr2](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/d/d7e4d3c89785004a5cdfcfffb6420a551e75e9b5.png)

From the LOT-Module:

 ![qr3](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/f/f275f6a6835c4dacef70547b0867be73654f56a6.png)

The printed label looks like this: _(not the same numbers as in the examples :wink:)_

- _upper label shows product qr-code:_
- _lower label shows lot qr-code_  
 ![qr](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/1/13237e2abf0e5daf22055165392950cd9658b6e6.png)

Hope this helps…

---

<div class="post-metadata">

**Author:** ![MobileIT](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/m/9de053/32.png) [@MobileIT](https://www.dolibarr.org/forum/u/MobileIT)\
**Post date:** [February 28, 2023, 5:51pm UTC](https://www.dolibarr.org/forum/t/print-product-barcodes/22602/6 "2023-02-28T17:51:41Z")

</div>

Ok thanks, will look at that

---

<div class="post-metadata">

**Author:** ![davidD](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/d/ecc23a/32.png) [@davidD](https://www.dolibarr.org/forum/u/davidD)\
**Post date:** [February 8, 2024, 2:01pm UTC](https://www.dolibarr.org/forum/t/print-product-barcodes/22602/7 "2024-02-08T14:01:30Z")

</div>

Hello Bro

I successfully make the modifications for the \product\card.php  
I see the button ’ PRINT QR-CODE ’ , at the right bottom of my producto page

 ![image](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/a/aafcbf964ca04e5b85b296f1ef9527645152a963.png)

When I try to print, nothing happen, the url i see on the button was:  
[https://www.webiste.com/my\_folder/product/card.php?action=printbarcode&id=35&token=1af4caeee8f87d2a4950594038f3b1f3cc](https://www.webiste.com/my_folder/product/card.php?action=printbarcode&id=35&token=1af4caeee8f87d2a4950594038f3b1f3cc)

I get the file ( interface\_99\_modZapier\_ZapierTriggers.class.php ) here :[interface\_99\_modZapier\_ZapierTriggers.class.php](https://doxygen.dolibarr.org/dolibarr_16.0/build/html/d7/d24/interface __99__ mod_zapier___zapier_triggers_8class_8php_source.html)

I modify it andput my personal URL

$url = “://xxx.xxx.xxx.xxx/printQRCode\_Doli.php?”.$fields;

but nothing  
Where can i find the file printQRCode\_Doli.php ?

---

<div class="post-metadata">

**Author:** ![Kim\_KW1975](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/k/46a35a/32.png) [@Kim\_KW1975](https://www.dolibarr.org/forum/u/Kim_KW1975)\
**Post date:** [February 13, 2024, 7:20pm UTC](https://www.dolibarr.org/forum/t/print-product-barcodes/22602/8 "2024-02-13T19:20:52Z")

</div>

Hi Bernd,  
would you be able to share eigther the modified files or a little bit more in dept description.  
What you did is exactly what I need for my system. But wasn’t able to make it work so far.  
Thanks a million.

---

<div class="post-metadata">

**Author:** ![DG-Rilling](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/d/e495f1/32.png) [@DG-Rilling](https://www.dolibarr.org/forum/u/DG-Rilling)\
**Post date:** [February 14, 2024, 8:48am UTC](https://www.dolibarr.org/forum/t/print-product-barcodes/22602/9 "2024-02-14T08:48:41Z")

</div>

Hi,  
I can share more details but at the moment I have no access to the server.  
Please give me some days….

---

<div class="post-metadata">

**Author:** ![DG-Rilling](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/d/e495f1/32.png) [@DG-Rilling](https://www.dolibarr.org/forum/u/DG-Rilling)\
**Post date:** [February 21, 2024, 9:57am UTC](https://www.dolibarr.org/forum/t/print-product-barcodes/22602/10 "2024-02-21T09:57:37Z")

</div>

The printQRCode\_Doli.php looks like the following:  
You can see that we use the library “phpqrcode”  
The generation and printing out the QR-Code is finally done in “QRCode.php”.

```auto

<?php
// file: printQRCode_Doli.php

// some includes
include('phpqrcode/qrlib.php'); 
include('QRCode.php');

 if(isset($_GET['pos1'])) {
 	$pos1 = $_GET['pos1'];
	if(empty($pos1)) {
	  $pos1=' ';
	}
 }else{
	$pos1='';
 }	

 if(isset($_GET['pos2'])) {
 	$pos2 = $_GET['pos2'];
	if(empty($pos2)) {
	  $pos2=' ';
	}
 }else{
	$pos2='';
 }	

 if(isset($_GET['pos3'])) {
 	$pos3 = $_GET['pos3'];
	if(empty($pos3)) {
	  $pos3=' ';
	}
 }else{
	$pos3='';
 }

 if(isset($_GET['pos4'])) {
 	$pos4 = $_GET['pos4'];
	if(empty($pos4)) {
	  $pos4=' ';
	}
 }else{
	$pos4=' ';
 }	

 if(isset($_GET['typ'])) {
 	$type = $_GET['typ'];
	if(empty($type)) {
	  $type=' ';
	}
 }else{
	$type='';
 }	

 $ret = $_GET['ret'];

file_put_contents('/tmp/qrcode.log', $pos1."|".$pos2."|".$pos3."|".$pos4."|".$type."|".$ret."\n", FILE_APPEND);

printQRCodeDolibarr($pos1,$pos2,$pos3,$pos4,$type,$ret);
	
exit;

?>

```

The file QRCode.php looks like:  
(you can modify the $codeContents to link to other pages in Dolibarr, but we decided that these links are usefull. In case of other links you have to modify/reference the proper ID.)  
BTW: You can see the resulting printed labels on my earlier post. If you use another label-printer you have to adapt to your needs.

```auto
<?
function printQRCodeDolibarr($pos1,$pos2,$pos3,$pos4,$type,$ret)
{
header('Content-Type: text/html; charset=utf-8');
    $tempDir = "temp/"; 

	switch ($type) {
		case 'card':
			# We still have an intermediate step to correctly resolve "old" QR-Codes in our old read-only DB. 
			# This is done using "sys=doli", which the old QR-Codes don't have.
			# same on case 'charge'
			# $codeContents = "http://<our_url>/type.php?id=".urlencode($ret)."&sys=doli";

			# gibt ID als Zielwert 
			$codeContents = "http://<your_dolibarr_url>/product/stock/productlot_card.php?id=".urlencode($ret);
			break;
		case 'charge':
			# $codeContents = "http://<our_url>/part.php?id=".urlencode($ret)."&sys=doli";
			# gibt ID als Zielwert 
			$codeContents = "http://<your_dolibarr_url>/product/card.php?id=".urlencode($ret);
			break;
	}

#echo $codeContents;
#echo "<br>";

    // we need to generate filename somehow,  
    // with md5 or with database ID used to obtains $codeContents... 
    $QRfileName = 'qrcode_'.md5($codeContents).'.png'; 
	$fileName = 'qrcodeT_'.md5($codeContents).'.png'; 
     
    $pngAbsoluteFilePath = $tempDir.$fileName; 
	$QRAbsoluteFilePath = $tempDir.$QRfileName; 
	
    $urlRelativeFilePathQR = 'temp/'.$QRfileName; 
	$urlRelativeFilePath = 'temp/'.$fileName; 
     
    // generating 
    QRcode::png($codeContents, $QRAbsoluteFilePath); 
    
    echo 'Server PNG File: '.$pngAbsoluteFilePath; 
    echo '<hr />'; 
     
    // displaying 
    echo '<img src="'.$urlRelativeFilePathQR.'" />'; 
	
	$im = imagecreatefrompng($QRAbsoluteFilePath);
	//imagesavealpha($im, true); // important to keep the png's transparency 
	if(!$im) {
		die("im is null");
	}
	$black = imagecolorallocate($im, 0, 0, 0);
	list($width, $height) = getimagesize($QRAbsoluteFilePath);
	
	$QL700width = 756;
	
	$largeQRpercentage = 0.5;
	$smallQRpercentage = 0.25;
	$heightLargerPercentage = 1.1;
	$newheight = $heightLargerPercentage*$height*$QL700width/$width*$largeQRpercentage ; // the height of the image
	
	$font = 6; // font size
	$leftTextPos = 10; // left position text
	
	$newImage = imagecreate($QL700width,$newheight);
	$QLImage = imagecreatetruecolor($QL700width,$newheight);
	imagecopyresampled($newImage,$im,0,10,0,0,$QL700width,$newheight/$heightLargerPercentage,$width/$largeQRpercentage,$height);
	imagecopyresampled($newImage,$im,$largeQRpercentage*$QL700width,20,0,0,$QL700width,$newheight/$heightLargerPercentage,$width/$smallQRpercentage,$height*$largeQRpercentage/$smallQRpercentage);
	imagecopyresampled($newImage,$im,($largeQRpercentage + $smallQRpercentage)*$QL700width,20,0,0,$QL700width,$newheight/$heightLargerPercentage,$width/$smallQRpercentage,$height*$largeQRpercentage/$smallQRpercentage);
	
	#-------------------------------------------------------------
    $label = $pos1;
    $labelfont = 4;
	$labelfont_large = 4;
	// pixel-width of label
	$txtsz = imagefontwidth($labelfont) * strlen($label);
	$txtsz_large = imagefontwidth($labelfont_large) * strlen($label);
	// pixel-height of label
	$txtht = imagefontheight($labelfont);
	$txtht_large = imagefontheight($labelfont_large);
	$labelimage = imagecreate($txtsz,$txtht);
	$labelimage_large = imagecreate($txtsz_large,$txtht_large);
	
	$white = imagecolorallocate($labelimage, 0xFF, 0xFF, 0xFF);
	$black = imagecolorallocate($labelimage, 0x00, 0x00, 0x00);
	$white = imagecolorallocate($labelimage_large, 0xFF, 0xFF, 0xFF);
	$black = imagecolorallocate($labelimage_large, 0x00, 0x00, 0x00);
	
	imagestring($labelimage, $labelfont_large, 0, 0, $label , $black);
	imagecopyresampled($newImage,$labelimage,40,0,0,0,3*$txtsz_large, 3*$txtht_large,$txtsz_large, $txtht_large);
	imagestring($labelimage, $labelfont, 0, 0, $label , $black);
	$labelimage1 = imagerotate($labelimage, -90, $white);
	imagecopyresampled($newImage,$labelimage1,$largeQRpercentage*$QL700width-10,40,0,0,2*$txtht, 0.8*$smallQRpercentage*$QL700width,$txtht, $txtsz);
	imagecopyresampled($newImage,$labelimage1,($largeQRpercentage + $smallQRpercentage)*$QL700width-10,40,0,0,2*$txtht, 0.8*$smallQRpercentage*$QL700width,$txtht, $txtsz);
	
	#-------------------------------------------------------------
    $label = "ID: ".$pos2;
	$txtsz = imagefontwidth($labelfont) * strlen($label);
	$txtht = imagefontheight($labelfont);
	$labelinfo = imagecreate($txtsz,$txtht);
	$white = imagecolorallocate($labelinfo, 0xFF, 0xFF, 0xFF);
	$black = imagecolorallocate($labelinfo, 0x00, 0x00, 0x00);
	imagestring($labelinfo, $labelfont, 0, 0, $label, $black);
	imagecopyresampled($newImage,$labelinfo,$largeQRpercentage*$QL700width-10,$smallQRpercentage*$QL700width+5,0,0,3*$txtsz, 3*$txtht,$txtsz, $txtht);
	
	#-------------------------------------------------------------
    $label = $pos3;
    $labelfont = 7;
	$labelfont_large = 6;
	$txtsz = imagefontwidth($labelfont) * strlen($label);
	$txtht = imagefontheight($labelfont);
	$labelinfo = imagecreate($txtsz,$txtht);
	$white = imagecolorallocate($labelinfo, 0xFF, 0xFF, 0xFF);
	$black = imagecolorallocate($labelinfo, 0x00, 0x00, 0x00);
	// imagestring($labelinfo, $labelfont, 0, 0, $label, $black);
    // changed to TrueType-Font for correct display of german umlauts
	$font = '/usr/share/fonts/truetype/droid/DroidSans.ttf';
	imagettftext($labelinfo, $labelfont, 0, 0, 10, $black, $font, $label);
	// imagestring($labelinfo, $labelfont, 0, 0, $label, $black);
	imagecopyresampled($newImage,$labelinfo,$largeQRpercentage*$QL700width-10,$smallQRpercentage*$QL700width+50,0,0,2*$txtsz, 3*$txtht,$txtsz, $txtht);

	#-------------------------------------------------------------
    $label = $pos4;
   	$labelfont = 2;
	$labelfont_large = 2;
	$txtsz = imagefontwidth($labelfont) * strlen($label);
	$txtht = imagefontheight($labelfont);
	$labelinfo = imagecreate($txtsz,$txtht);
	$white = imagecolorallocate($labelinfo, 0xFF, 0xFF, 0xFF);
	$black = imagecolorallocate($labelinfo, 0x00, 0x00, 0x00);
	imagestring($labelinfo, $labelfont, 0, 0, $label, $black);
	imagecopyresampled($newImage,$labelinfo,$largeQRpercentage*$QL700width-10,$smallQRpercentage*$QL700width+90,0,0,2*$txtsz, 3*$txtht,$txtsz, $txtht);

	imagepng($newImage, $pngAbsoluteFilePath, 0);
	imagedestroy($im);
	imagedestroy($labelimage1);
	imagedestroy($labelinfo);
	imagedestroy($labelimage);
	echo '<img src="'.$urlRelativeFilePath.'" />'; 
	
	// printing to QL-700
	shell_exec("lp -d QL-700 -o orientation-requested=6 ".$pngAbsoluteFilePath);
}
	
?>	

```

---

<div class="post-metadata">

**Author:** ![davidD](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/d/ecc23a/32.png) [@davidD](https://www.dolibarr.org/forum/u/davidD)\
**Post date:** [February 21, 2024, 10:13am UTC](https://www.dolibarr.org/forum/t/print-product-barcodes/22602/11 "2024-02-21T10:13:20Z")

</div>

So many thanks,

I’m going to test your work asap !!  
I’ll tell you today what’s happen for me

So, So, So many thanks  
I appreciate it

---

<div class="post-metadata">

**Author:** ![davidD](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/d/ecc23a/32.png) [@davidD](https://www.dolibarr.org/forum/u/davidD)\
**Post date:** [February 21, 2024, 1:03pm UTC](https://www.dolibarr.org/forum/t/print-product-barcodes/22602/12 "2024-02-21T13:03:55Z")

</div>

Hello DG-Rilling

I make all the necessary, but always some interogations from my part  
Sorry

I resume:

File: htdocs/…/product/ **card.php**

 ![image](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/2/2cb7838dc6a1609552e8e0bde0fe55de0f7d5a77.png)

and

 ![image](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/8/87e0b5e0fb503c5319a6c41e7803ee2fb17fd9d7.png)

File: htdocs/…/core/triggers/ **interface\_99\_modZapier\_ZapierTriggers.class.php**

 ![image](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/e/e12e09eb9b84df2a6a61cf6e57041f82ede5a484.png)

and  
I change the name of my website of course

 ![image](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/9/9e16420bb6338c340320aa9fdae9de1b01a0edd7.png)

Then, I created the files here:  
htdocs/…/product/ **printQRCode\_Doli.php**  
htdocs/…/product/ **QRCode.php**

 ![image](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/0/027a70523f9e85d833741f23a30bd0279a092149.png)

I change the name of my website of course

 ![image](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/8/8f8b339108945d21246aee1e11d61bc1b2e710eb.png)

It’s happen nothing

 ![image](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/d/d8ab6d1afe6c2fa4754992a790561571d12378fe.png)

1°) Could you tell me where did you put your printQRCode\_Doli.php and QRCode.php ?  
2°) Where can i have this qrlib.php ?  
 ![image](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/e/e29134f2c096363dc15e92fcadb5954f0758f802.png)

Sorry for the disturb…

---

<div class="post-metadata">

**Author:** ![DG-Rilling](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/d/e495f1/32.png) [@DG-Rilling](https://www.dolibarr.org/forum/u/DG-Rilling)\
**Post date:** [February 22, 2024, 8:19pm UTC](https://www.dolibarr.org/forum/t/print-product-barcodes/22602/13 "2024-02-22T20:19:58Z")

</div>

The description is based on our configuration with \<Dolibarr (Cloud) \<–INTERNET–\> WebServer with LabelPrinter (Local)\>

Therefore are both files  
“printQRCode\_Doli.php” and “QRCode.php” located on the local-pc where the labelprinter is connected. Printing is finally done with the "shell\_exec(“lp -d QL-700 …”)

If you are running Dolibarr on a local machine with labelprinter directly connected then you don’t need the “printQRcode\_Doli.php”  
because in the function QRcodePostWebHook(…) you have all the variables for the label.  
And Dolibarr has the functionality to produce the QR-Code, look at htdocs\includes\tecnickcom\tcpdfhtdocs/include  
There you will find the library and also some examples.

---

<div class="post-metadata">

**Author:** ![davidD](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/d/ecc23a/32.png) [@davidD](https://www.dolibarr.org/forum/u/davidD)\
**Post date:** [February 23, 2024, 4:09pm UTC](https://www.dolibarr.org/forum/t/print-product-barcodes/22602/14 "2024-02-23T16:09:51Z")

</div>

thank you Bro.

I appreciate it

have a nice day
