Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created March 29, 2023 22:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/dc7daebd52443fabe4d312fda8481061 to your computer and use it in GitHub Desktop.
Save parzibyte/dc7daebd52443fabe4d312fda8481061 to your computer and use it in GitHub Desktop.
var conector = new ConectorPluginV3(ConectorPluginV3.URL_PLUGIN_POR_DEFECTO, serial);
conector
.Iniciar()
.EstablecerAlineacion(ConectorPluginV3.ALINEACION_CENTRO)
.EscribirTexto("Estoy en el centro\n")
.EstablecerAlineacion(ConectorPluginV3.ALINEACION_DERECHA)
.EscribirTexto("Estoy a la derecha\n")
.EstablecerAlineacion(ConectorPluginV3.ALINEACION_IZQUIERDA)
.EscribirTexto("Estoy a la izquierda\n")
.Feed(2)
.EstablecerAlineacion(ConectorPluginV3.ALINEACION_CENTRO)
.ImprimirCodigoQr("Soy un QR impreso desde C# usando el plugin de Parzibyte!", 200, ConectorPluginV3.RECUPERACION_QR_ALTA, ConectorPluginV3.TAMANO_IMAGEN_NORMAL)
.Iniciar() // En mi impresora es necesario volver a iniciar después de imprimir una imagen
.EscribirTexto("¿Esto soporta tildes? áéíóú")
.Feed(1)
// Recuerda que es posible que la imagen no esté en línea en el futuro. Simplemente coloca otra URL válida en caso de que falle
.DescargarImagenDeInternetEImprimir(
"https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/f/d10b9ade-6ca1-4f15-90a6-3825345f5c0b/ddjud3k-ca70e9ff-f5b7-4d09-8232-bd8569a214b5.png?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1cm46YXBwOjdlMGQxODg5ODIyNjQzNzNhNWYwZDQxNWVhMGQyNmUwIiwiaXNzIjoidXJuOmFwcDo3ZTBkMTg4OTgyMjY0MzczYTVmMGQ0MTVlYTBkMjZlMCIsIm9iaiI6W1t7InBhdGgiOiJcL2ZcL2QxMGI5YWRlLTZjYTEtNGYxNS05MGE2LTM4MjUzNDVmNWMwYlwvZGRqdWQzay1jYTcwZTlmZi1mNWI3LTRkMDktODIzMi1iZDg1NjlhMjE0YjUucG5nIn1dXSwiYXVkIjpbInVybjpzZXJ2aWNlOmZpbGUuZG93bmxvYWQiXX0.jRbiKH4w9GHxuYnj3yM9e4_xcoMYBoJjCjGStLGjh4o",
ConectorPluginV3.TAMANO_IMAGEN_NORMAL,
200
)
.Iniciar() // En mi impresora es necesario volver a iniciar después de imprimir una imagen
.Corte(1)
.CorteParcial()
.Pulso(48, 60, 120); // Cajón
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment