Print System Question's

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
Claudio Ricardo
Posts: 367
Joined: Tue Oct 27, 2020 3:38 am
DBs Used: DBF, MySQL, MariaDB
Location: Bs. As. - Argentina

Print System Question's

Post by Claudio Ricardo »

Hola a todos !!!
Estoy trabajando con la excelente y muy intuitiva librería de impresión.
En pocos minutos y gracias a lo bién documentada que está, logré lo que quería !

Ahora tengo sólo dos preguntas:
Cómo seteo el PaperLenght para una impresora térmica que usa rollo de 79mm. de ancho
(eso ya está) pero el ticket puede tener de 10 cmt. a más de 1 metro de largo !
No dispongo de la impresora física acá y no puedo hacer pruebas en el establecimiento...
Si alguien lo probó y me puede indicar me ayudaría a no cometer errores !

Hello everyone !!!
I am working with the excellent and very intuitive printing library.
In a few minutes and thanks to how well documented it is, I achieved what I wanted !

Now I have only two questions:
How do I set the PaperLength for a thermal printer that uses a 79mm. roll wide
(That's it) but the ticket can be 10 cmt. more than 1 meter long !
I don't have the physical printer here and I can't do tests in the establishment...
If someone tried it and can tell me it would help me not to make mistakes !

Code: Select all

	Select Printer Default To lOk;
		Orientation PRINTER_ORIENT_PORTRAIT;
		PaperSize PRINTER_PAPER_USER;
		PaperLength 300;	// <<-- HPDF have limit... in this lib. what is the limit ? or no limit ?
		PaperWidth 79;
		Copies 1;
		DefaultSource PRINTER_BIN_LARGECAPACITY;	// Is correct ?
		Quality PRINTER_RES_MEDIUM;
		Color PRINTER_COLOR_MONOCHROME;
		Collate PRINTER_COLLATE_FALSE;
		PreView	// <<-- only for test at home...

	If ! lOk
	............ 
Segunda pregunta:
La ventana Preview se muestra en 1600x900px.
Se puede redimensionar al llamarla o tengo que modificar la librería y recompilarla ?
Desde yá muy agradecido !!!

Second question:
The Preview window is displayed at 1600x900px.
Can it be resized for code, or do I have to modify the library and recompile it ?
From now very grateful !!!
Corrige al sabio y lo harás más sabio, Corrige al necio y lo harás tu enemigo.
WhatsApp / Telegram: +54 911-63016162
JALMAG
Posts: 265
Joined: Sun Jan 10, 2010 7:05 pm
DBs Used: DBF, MariaDB
Location: España - Spain

Re: Print System Question's

Post by JALMAG »

Hola Claudio, yo imprimo e imprimo, por ejemplo el final de mi tiquet es:

nLin+=4
@ nLin,nCol PRINT LINE TO nLin,78 PENWIDTH 0.1
nLin+=0
@ nLin,nCol PRINT 'Agradecemos su visita, vuelva siempre.' FONT "Helvetica-Bold" SIZE 8
nLin+=4
@ nLin,nCol PRINT LINE TO nLin,78 PENWIDTH 0.1

nLin+=2
@ nLin,nCol PRINT 'Cambio de pila e intervenciones parciales' FONT "Helvetica-Bold" SIZE 7
nLin+=3
@ nLin,nCol PRINT 'NO garantizan la estanqueidad del reloj.' FONT "Helvetica-Bold" SIZE 7
nLin+=3
@ nLin,nCol PRINT ''

* nLin...puede llegar hasta donde quieras, nCol como bien sabes hasta 79

No obstante en las tiqueteras en su configuración en windows tienen la opción de cortar tiquet al finalizar impresión e incluso abrir el cajón de monedas, esto hará que tu tiquet tenga la longitud que tenga será cortado una vez concluya la impresión.
Igualmente tienes los codigos de ESCAPE de la tiquetera para realizarlo tu mismo, en mi caso:

PUBLIC CORTEPAPEL3:=Chr(27) + "m" //Realizo el corte parcial del papel GENERICA
PUBLIC ABRECAJON4:=Chr(27)+chr(112)+chr(48)+chr(55)+chr(121)

Espero haberte ayudado
User avatar
Claudio Ricardo
Posts: 367
Joined: Tue Oct 27, 2020 3:38 am
DBs Used: DBF, MySQL, MariaDB
Location: Bs. As. - Argentina

Re: Print System Question's

Post by Claudio Ricardo »

Muy agradecido por tu pronta respuesta !!!
Nunca había usado esta librería y temia que cortara la impresión al llegar al valor de PaperLenght !
Corrige al sabio y lo harás más sabio, Corrige al necio y lo harás tu enemigo.
WhatsApp / Telegram: +54 911-63016162
Post Reply