User Tools

Site Tools


cobi.wms:label_templates

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
cobi.wms:label_templates [2022/12/01 11:15] tkammercobi.wms:label_templates [2023/06/19 13:59] (current) tkammer
Line 90: Line 90:
 | ''serialLotNumber''             | Lot-number of serial number | | ''serialLotNumber''             | Lot-number of serial number |
 | ''serialDetails''               | Serial details/notes | | ''serialDetails''               | Serial details/notes |
 +^ Warehouse-level ^^
 +| ''warehouseCode''               | Warehouse code |
 +| ''warehouseName''               | Warehouse name |
 ^ Bin location-level ^^ ^ Bin location-level ^^
 | ''locationCode''                | Bin location code | | ''locationCode''                | Bin location code |
Line 188: Line 191:
 === Better control of generated HTML === === Better control of generated HTML ===
  
-The ''barcode()'' placeholder generates a whole ''<img ... />'' tag in the generated HTML.  If you want closer control over the HTML, like adding additional attributes to the ''img'' tag, you can use the ''barcodeB64()'' placeholder instead, which produces a PNG in Base64.  Example:+The ''barcode()'' placeholder generates a whole ''<img ... />'' tag in the generated HTML.  If you want closer control over the HTML, like adding additional attributes to the ''img'' tag, you can use the ''barcodeSrc()'' or ''barcodeBase64()'' placeholders instead
 + 
 +The ''barcodeSrc'' placeholder generates only the contents of the ''src'' attribute.  Example: 
 + 
 +<code> 
 +<img id='...' class='...' src='@barcodeSrc(...)@' /> 
 +</code> 
 + 
 +The ''barcodeBase64'' placeholder generates only the Base64 string.  Example:
  
 <code> <code>
-<img id='...' class='...' src='data:image/png;base64,@barcodeB64(...)@' />+<img id='...' class='...' src='data:image/png;base64,@barcodeBase64(...)@' />
 </code> </code>
  
-The parameters of the ''barcodeB64()'' placeholder are exactly the same as that of the regular ''barcode()'' placeholder.  That means you must still provide the ''WIDTH'' and ''HEIGHT'' parameters; these will be passed to the barcode generation system that produces the Base64 PNG.+The parameters of the ''barcodeSrc()'' and ''barcodeBase64()'' placeholders are exactly the same as that of the regular ''barcode()'' placeholder.  That means you must still provide the ''WIDTH'' and ''HEIGHT'' parameters; these will be passed to the barcode generation system that produces the Base64 PNG.  (This has no effect on the width and height of the ''img'' element in HTML/CSS.)
  
 ==== User-input values ==== ==== User-input values ====
Line 357: Line 368:
              sure the HTML renderer doesn't start a second page. */              sure the HTML renderer doesn't start a second page. */
           width: 148mm;           width: 148mm;
-          height: 104.9mm;+          height: 104mm;
  
           /* Don't change, use the container below. */           /* Don't change, use the container below. */
Line 445: Line 456:
              sure the HTML renderer doesn't start a second page. */              sure the HTML renderer doesn't start a second page. */
           width: 148mm;           width: 148mm;
-          height: 104.9mm;+          height: 104mm;
  
           /* Don't change, use the container below. */           /* Don't change, use the container below. */
Line 470: Line 481:
         }         }
     </style>     </style>
 +
     <!-- Input definitions:     <!-- Input definitions:
- 
     @input(text[Insert value])@     @input(text[Insert value])@
     @input(selection[Select value];Value 1,Value 2,Value 3)@     @input(selection[Select value];Value 1,Value 2,Value 3)@
     @input(codeFormat[Barcode type];CODE_128,DATA_MATRIX,QR_CODE)@     @input(codeFormat[Barcode type];CODE_128,DATA_MATRIX,QR_CODE)@
- 
     -->     -->
  
-    <!-- @useJavaScript@ --> 
     <script>     <script>
 +        // @useJavaScript@
         window.onload = function() {         window.onload = function() {
             var insert = document.getElementById('js-insert')             var insert = document.getElementById('js-insert')
             insert.textContent = "Hello World!"             insert.textContent = "Hello World!"
-            window.cobiwms.print()+            cobiwms.print()
         }         }
     </script>     </script>
cobi.wms/label_templates.1669889743.txt.gz · Last modified: 2022/12/01 11:15 by tkammer

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki