Página 1 de 1

Relatorios com HBprinter fora de formatacao

Enviado: 17 Ago 2009 11:49
por mmaciel11
Bom dia a todos,



Caros faço meus relatorios utilizando HBPrinter e estou com um problema:

Utilizo uma impressora HP Deskjet 1020 onde faço os testes dos meus relatorios, mais quando imprimo para uma lexmark laser que tem aqui no serviço a formatacao sai toda errada, toda fora de linhagem, mais quando imprimo na HP sai que é uma beleza, alguem saberia me dizer o que é ???

vou postar meu codigo fonte exemplo para analise:

Function Imprimir_Ferias2()
Local nLinha := 0
Local nPagina := 1
Local _qtd_ps := 0

PRIVATE aPrinters, aports

INIT PRINTSYS
GET PRINTERS TO aprinters
GET PORTS TO aports
RELEASE PRINTSYS

SELECT BY DIALOG PREVIEW

If HBPRNERROR > 0
return
Endif

SET PREVIEW SCALE 2.3
Set Page orientation DMORIENT_PORTRAIT papersize DMPAPER_A4 font "f0"

define font "F_Arial_10" name "arial" size 10
define font "F_Arial_10B" name "arial" size 10 bold
define font "F_Arial_11" name "arial" size 11
define font "F_Arial_11B" name "arial" size 11 bold
define font "F_Arial_12" name "arial" size 12
define font "F_Arial_12B" name "arial" size 12 bold
define font "F_Arial-13" name "arial" size 13
define font "F_Arial_13B" name "arial" size 13 bold
define font "F_Arial_14" name "arial" size 14
define font "F_Arial_14B" name "arial" size 14 bold
define font "F_Arial_16" name "arial" size 16
define font "F_Arial_16B" name "arial" size 16 bold

define Pen "P_Linha1" style PS_SOLID width 1 color 0x000000 // linha fina
define Pen "P_Linha2" style PS_SOLID width 4 color 0x000000 // lin

START DOC NAME "Ferias"

START PAGE

@ 03, 05 Say 'AVISO E RECIBO DE FÉRIAS' FONT 'F_Arial_16B' to PRINT
@ 01, 50, 06, 96 RECTANGLE
@ 02, 52 Say 'Capitulo VI - Título II da C.L.T.' FONT 'F_Arial_10' to PRINT
@ 03, 52 Say 'Decreto-Lei Nº 5.452 de 01/05/1943 com as alterações' FONT 'F_Arial_10' to PRINT
@ 04, 52 Say 'do Decreto-Lei Nº 1535 de 13/04/1977' FONT 'F_Arial_10' to PRINT
@ 05, 52 Say 'Art 135 da C.L.T.' FONT 'F_Arial_10' to PRINT

END PAGE
END DOC

QUANDO IMPRIMO NA HP DESKJET 1020 IMPRESSORA QUE UTILIZO COMO BASE PARA TESTE FICA QUE É UMA BELEZA, MAIS QUANDO IMPRIMO NA LEXMARK O TEXTO FICA FORA DO RETANGULO, NO PREVIEW JA VEJO O ERRO... O QUE SERIA ???


FICO NO AGUARDO


Utilizo Xhabour 1.0.0.+ minigui + bcc

Re: Relatorios com HBprinter fora de formatacao

Enviado: 17 Ago 2009 11:54
por mmaciel11
UMA SAIDA QUE VI ... É CRIAR UM MENU PARA ESCOLHER A IMPRESSORA... MAIS NAO ACHO LEGAL,, POIS ESTAMOS EM AMBIENTE WINDOWS !!!

Re: Relatorios com HBprinter fora de formatacao

Enviado: 17 Ago 2009 13:02
por RamonXHB
Experimente colocar um SET UNITS MM
antes de
SET PREVIEW SCALE 2.3
Set Page orientation DMORIENT_PORTRAIT papersize DMPAPER_A4 font "f0"

Re: Relatorios com HBprinter fora de formatacao

Enviado: 18 Ago 2009 11:48
por mmaciel11
Nao sou muito bom de ingles... alguem pode traduzir...


Obrigado !!!


The best way to get the most similiar printout on various printers is to use SET UNITS MM, remembering to use margins large enough for all printers.

When setting units to rowcol, you must consider that the font is not mapped by different printer drivers exactly the same. Row height is measured using mapped printer DC font, so, it slightly differ on various printers.

Setting units mm, printout position is calculated using printer resolution in pixels-per-inch, so this method is more exact than using units rowcol.

Re: Relatorios com HBprinter fora de formatacao

Enviado: 18 Ago 2009 12:27
por Toledo
Bom, acho que seria isto:
A melhor maneira para obter impressão semelhante em várias impressoras é usar SET UNITS MM, lembrando de usar margem suficientemente grande para todas as impressoras.

Ao definir UNITS como ROWCOL, você deve considerar que a fonte não é mapeada por diferentes impressoras exatamente a mesma forma. A altura da linha é medida utilizando DC fonte mapeadas da impressora, assim, diferem ligeiramente em diversas impressoras.

Definir UNITS MM, a posição da saída de impressão é calculada utilizando a resolução em pixels por polegada, de modo que este método é mais preciso do que utilizando UNITS ROWCOL.

Re: Relatorios com HBprinter fora de formatacao

Enviado: 18 Ago 2009 15:21
por mmaciel11
valeu !!!