Como imprimir textos con orientacion diferente

HMG en Español

Moderator: Rathinagiri

jucar_es
Posts: 82
Joined: Thu Nov 13, 2008 11:12 pm

Como imprimir textos con orientacion diferente

Post by jucar_es »

Buen dia a todos

alguien sabe como puedo imprimir un en dos orientaciones DIFente orientacion

T
E
X
T
O

---texto

GRACIAS
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Como imprimir textos con orientacion diferente

Post by Pablo César »

Te faltó dar más detalles de como estás imprimiendo. Si en modo gráfico, en modo texto ? Si puede ser en PDF...

En HaruPDF hay: HPDF_PAGE_PORTRAIT y HPDF_PAGE_LANDSCAPE

En HPDF tambien: HPDF_ORIENT_PORTRAIT y HPDF_ORIENT_LANDSCAPE

En HMG Print system tambien: PRINTER_ORIENT_PORTRAIT y PRINTER_ORIENT_LANDSCAPE

Si es una solución para modo Texto, puede utilizar los comandos internos de la impresora. Por ejemplo, para las impresoras HP LASER and DESKJET:

Landscape: CHR(27)+'&l1O'
Portrait: CHR(27)+'&l0O'
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
mol
Posts: 3774
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: Como imprimir textos con orientacion diferente

Post by mol »

Pablo, I don't think you've understood well.
It's impossible in the straight way.
You should define function to print char by char changing row by line height and setting column to the same value:

Code: Select all

For i:=1 to len(cTextToPrint)
@ nRow+nLineHeight*(i-1), nCol print substr(cTextToPrint,i,1)
Next i
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Como imprimir textos con orientacion diferente

Post by Pablo César »

Ohhh sorry, you are right Marek. I missunderstood, thank you to advise.

If the queston is:

Posible to print images
Possible to save image to file
Possible to display text in different orientation thru BossTaurus like as:

BT_TEXT_NORMAL_ORIENTATION
BT_TEXT_VERTICAL_ASCENDANT
BT_TEXT_VERTICAL_DESCENDANT
BT_TEXT_DIAGONAL_ASCENDANT
BT_TEXT_DIAGONAL_DESCENDANT

Then I believe would it be posible too. I also believe that could be not necessary to save image to a file for printing.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Javier Tovar
Posts: 1275
Joined: Tue Sep 03, 2013 4:22 am
Location: Tecámac, México

Re: Como imprimir textos con orientacion diferente

Post by Javier Tovar »

Hola jucar_es,

También es posible haciendo una rutina para que las muestre en coordenadas o posición que quieras!, en Clipper una vez baje un demo que lo hacia, claro que era en modo consola, pero ahorita no lo tengo a la mano, a lo mejor lo perdí, pero creo que sustrayendo cada carácter del texto a imprimir se puede hacer!

Saludos, y por falta de tiempo no puedo hacer un demo :)
User avatar
andyglezl
Posts: 1461
Joined: Fri Oct 26, 2012 7:58 pm
Location: Guadalajara Jalisco, MX
Contact:

Re: Como imprimir textos con orientacion diferente

Post by andyglezl »

Hola

Prueba lo siguiente... ( Texto Vertical )
--------------------
Try this ... ( Vertical Text )

Code: Select all

FUNCTION Imprime()
	LOCAL cText := "T h i s    i s    a    T e x t "
	SELECT PRINTER DIALOG TO lSuccess PREVIEW
    IF lSuccess == .T.
        START PRINTDOC

                START PRINTPAGE
					@ 050,010 PRINT cText TO 100,014 FONT "Courier New" SIZE 9 
					@ 105,010 PRINT cText                  FONT "Courier New" SIZE 9 
                END PRINTPAGE

		END PRINTDOC
    ENDIF				
RETURN nil
Andrés González López
Desde Guadalajara, Jalisco. México.
JALMAG
Posts: 265
Joined: Sun Jan 10, 2010 7:05 pm
DBs Used: DBF, MariaDB
Location: España - Spain

Re: Como imprimir textos con orientacion diferente

Post by JALMAG »

jucar_es wrote:Buen dia a todos

alguien sabe como puedo imprimir un en dos orientaciones DIFente orientacion

T
E
X
T
O

---texto

GRACIAS
PRINT posee una propiedad que se llama ANGLE, Ejemplo:
@ 47,11 PRINT "Precio Venta Público recomendado: "+Mil(WinPedDat.T_TotalPed.Value+nPorcentaje,9,2)+ " €" ;
FONT "Arial" ;
SIZE 16 COLOR GRAY ANGLE -90

Lo imprime en vertical.

HPDFPRINT tambien lo tiene implementado...en HMG, aunque en Minigui Extended aun no lo está
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Como imprimir textos con orientacion diferente

Post by Pablo César »

JALMAG wrote:PRINT posee una propiedad que se llama ANGLE, Ejemplo:
@ 47,11 PRINT "Precio Venta Público recomendado: "+Mil(WinPedDat.T_TotalPed.Value+nPorcentaje,9,2)+ " €" ;
FONT "Arial" ;
SIZE 16 COLOR GRAY ANGLE -90

Lo imprime en vertical.

HPDFPRINT tambien lo tiene implementado...en HMG
Me parece que en HMG no existe esta propiedad. Lo que vi es que está presente es para HPDFPRINT ARC RADIUS. Estás seguro que en HMG se puede imprimir como dices ?

En Minigui Extended, en el ejemplo C:\minigui\SAMPLES\BASIC\MiniPrint existe la propiedad ANGLE como dices. Pero en HMG me parece que no. :cry:
Screen.PNG
Screen.PNG (27.86 KiB) Viewed 4134 times
Existe diferencia en la funcion _HMG_PRINTER_H_PRINT (@ ... PRINT) entre HMG y Minigui Extended.
En HMG, no existe los parametros lAngle y nAngle como los tiene en Minigui Extended. Eso porque la funcion _HMG_PRINTER_C_PRINT en C no está presente.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
JALMAG
Posts: 265
Joined: Sun Jan 10, 2010 7:05 pm
DBs Used: DBF, MariaDB
Location: España - Spain

Re: Como imprimir textos con orientacion diferente

Post by JALMAG »

Pablo César wrote:
JALMAG wrote:PRINT posee una propiedad que se llama ANGLE, Ejemplo:
@ 47,11 PRINT "Precio Venta Público recomendado: "+Mil(WinPedDat.T_TotalPed.Value+nPorcentaje,9,2)+ " €" ;
FONT "Arial" ;
SIZE 16 COLOR GRAY ANGLE -90

Lo imprime en vertical.

HPDFPRINT tambien lo tiene implementado...en HMG
Me parece que en HMG no existe esta propiedad. Lo que vi es que está presente es para HPDFPRINT ARC RADIUS. Estás seguro que en HMG se puede imprimir como dices ?

En Minigui Extended, en el ejemplo C:\minigui\SAMPLES\BASIC\MiniPrint existe la propiedad ANGLE como dices. Pero en HMG me parece que no. :cry:
Screen.PNG
Existe diferencia en la funcion _HMG_PRINTER_H_PRINT (@ ... PRINT) entre HMG y Minigui Extended.
En HMG, no existe los parametros lAngle y nAngle como los tiene en Minigui Extended. Eso porque la funcion _HMG_PRINTER_C_PRINT en C no está presente.

Efectivamente lo utilizo en Minigui Extended, creia que igualmente esta propiedad estaba presente en HMG. No obstante se puede utilizar hmg_hpdf que si dispone de esa propiedad en lazandolo en la compilacion.
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Como imprimir textos con orientacion diferente

Post by Pablo César »

JALMAG wrote:No obstante se puede utilizar hmg_hpdf que si dispone de esa propiedad en lazandolo en la compilacion.
Disculpame, pero sigo no viendo como actualmente puede ser usado en hmg_hpdf. Puedes describir como hacerlo ?
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Post Reply