-
-
Save parzibyte/6b114ec721cbec67cd6bd658d913e89a 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
async probarImpresion() { | |
if (!this.impresoraSeleccionada) { | |
return alert("Seleccione una impresora"); | |
} | |
if (!this.mensaje) { | |
return alert("Escribe un mensaje"); | |
} | |
const conector = new ConectorPluginV3(); | |
conector | |
.Iniciar() | |
.EstablecerAlineacion(ConectorPluginV3.ALINEACION_CENTRO) | |
.EscribirTexto("Hola Angular desde parzibyte.me") | |
.Feed(1) | |
.EscribirTexto(this.mensaje) | |
.Feed(1) | |
.DescargarImagenDeInternetEImprimir("https://upload.wikimedia.org/wikipedia/commons/thumb/c/cf/Angular_full_color_logo.svg/1200px-Angular_full_color_logo.svg.png", ConectorPluginV3.TAMAÑO_IMAGEN_NORMAL, 400) | |
.Iniciar() | |
.Feed(1); | |
const respuesta = await conector.imprimirEn(this.impresoraSeleccionada); | |
if (respuesta == true) { | |
console.log("Impresión correcta"); | |
} else { | |
console.log("Error: " + respuesta); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment