Created
August 19, 2019 17:02
-
-
Save parzibyte/d924ec3a9549bb70c6009ed2dff2a7cb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Ejemplos de uso de JsBarcode | |
* | |
* @author parzibyte | |
* | |
* https://parzibyte.me/blog | |
*/ | |
JsBarcode(".codigo") | |
.options({ | |
format: "CODE128",// El formato | |
width: 2, // La anchura de cada barra | |
height: 30, // La altura del código | |
displayValue: true, // ¿Mostrar el valor (como texto) del código de barras? | |
text: "Hola", // Texto (no código) que acompaña al barcode | |
fontOptions: "bold", // Opciones de la fuente del texto del barcode | |
textAlign: "left", // En dónde poner el texto. center, left o right | |
textPosition: "top", // Poner el texto arriba (top) o abajo (bottom) | |
textMargin: 10, // Margen entre el texto y el código de barras | |
fontSize: 8, // Tamaño de la fuente | |
background: "#8bc34a", // Color de fondo | |
lineColor: "#FF0000", // Color de cada barra | |
marginTop: 10, // Margen superior | |
marginRight: 10, // Margen derecho | |
marginBottom: 5, // Margen inferior | |
marginLeft: 35, // Margen izquierdo | |
}) | |
.init(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment