Page 1 of 6

Problema con HaruPDF

Posted: Sat Apr 13, 2013 12:11 am
by andyglezl
Hola a todos

Me puse de nuevo a probar la HaruPDF, todo iba bien, hasta que dejo de generar el archivo .pdf.
Intente, intente, intente... hasta que me di cuenta de un cambio que habia hecho, lo corregí, lo
probe y de nuevo funcionó, ya me genera de nuevo el archivo !!!

Lo que hice fué que cambié el tipo de font que traía el ejemplo (Courier-Bold) por:
@ 050,011 HPDFPRINT A2O( AllTrim(cEmpresa) ) FONT "Verdana" SIZE 8 COLOR BLACK
y con este cambio dejo de generar el archivo .pdf

Es un Bug ? o hay solo ciertos Fonts que funcionan con la HaruPDF ?. Gracias
------------------------------------------------------------------------------------------
Hi all

I got back to test the HaruPDF, everything was fine, until I stop generate the. Pdf.
Try, try, try ... until I realized I had made a change, I corrected it, it
probe and again it worked, I generate the file again!

What I did was to change the type of font that brought the example (Courier-Bold) by:
@ 050.011 HPDFPRINT A2O (ALLTRIM (cEmpresa)) FONT "Verdana" SIZE 8 COLOR BLACK
and with this change no longer generates the. pdf

It is a bug? or are there only certain fonts that work with HaruPDF?. thanks

Re: Problema con HaruPDF

Posted: Sat Apr 13, 2013 2:50 am
by Rathinagiri
HaruPDF can handle some fonts natively and all ttf fonts. In the case of a ttf font, it is being embedded into the PDF document itself.

The following are the base14 fonts, natively handled by HaruPDF.
Courier
Courier-Bold
Courier-Oblique
Courier-BoldOblique
Helvetica
Helvetica-Bold
Helvetica-Oblique
Helvetica-BoldOblique
Times-Roman
Times-Bold
Times-Italic
Times-BoldItalic
Symbol
ZapfDingbats

You were using 'courier-bold' which is a base14 font by itself. So it should not be a problem at all. Can you post a small sample?

Re: Problema con HaruPDF

Posted: Sat Apr 13, 2013 4:09 pm
by andyglezl
Hola rathinagiri

Te anexo el ejemplo que no genera el archivo PDF.
--------------------------------------------------
Hello rathinagiri

I annex the example does not generate the PDF file.

Re: Problema con HaruPDF

Posted: Tue Apr 16, 2013 1:40 am
by andyglezl
Me parece GENIAL la HaruPDF, ya pude hacer un formato con mas
control sobre los datos y un poco mas de "vista", solo que encontré
otros 2 detalles.

* Yo utilizo la función HB_OEMTOANSI(msj) para desplegar acentos, ñÑ
y algun otro caracter. Al pasarlos a la HaruPDF, me despliega algo
diferente con la misma función, Ejemplo: SÆbado, 13 de Abril de 2013
en vez de Sábado.

* Quiero utilizar la función HMG_HPDF_PageNo(), pero no despliega nada !
ni poniendola como viene en el ejemplo:

nCurrentPage:=HMG_HPDF_PageNo()
@ 030,200 HPDFPRINT nCurrentPage SIZE 10 COLOR BLACK RIGHT
@ 036,200 HPDFPRINT FechTex( DATE() ) SIZE 10 COLOR BLACK RIGHT

Algún detalle que me esté faltando ? Gracias.
------------------------------------------------------------------------------------------
The HaruPDF I feel great because I could do a format with more
control over data and a bit more "view", only found
2 further details.

* I use HB_OEMTOANSI function (msg) to display accents, ñÑ
and some other character. By passing the HaruPDF, I deployed something
different with the same function, Example: SÆbado, 13 de Abril de 2013
instead of Sábado.

* I use the HMG_HPDF_PageNo (), but does not display anything!
nor is putting it as in this example:

nCurrentPage:=HMG_HPDF_PageNo()
@ 030,200 HPDFPRINT nCurrentPage SIZE 10 COLOR BLACK RIGHT
@ 036,200 HPDFPRINT FechTex( DATE() ) SIZE 10 COLOR BLACK RIGHT

Some details that I'm missing? Thank you.
-------------------------------------------------------------------------------------------

Re: Problema con HaruPDF

Posted: Thu Apr 18, 2013 9:43 pm
by andyglezl
Hola

Ya encontré porque no funcionaba lo siguiente:

nCurrentPage:=HMG_HPDF_PageNo()
@ 044,200 HPDFPRINT HMG_HPDF_PageNo() SIZE 10 COLOR BLACK RIGHT
@ 044,200 HPDFPRINT nCurrentPage SIZE 10 COLOR BLACK RIGHT


Lo que pasa es que ambos valores son NUMERICOS,
y ningun valor numerico se "imprime" al usar la HaruPDF.

tuve que convertir a caracter y asi, si funciona.

@ nVeces+133,155 HPDFPRINT STR( HMG_HPDF_PageNo() )

Anexo 2 rutinas (reglas) que me ayudaron al momento del diseño del PDF.
---------------------------------------------------------------------------

I found it did not work the following:

nCurrentPage: = HMG_HPDF_PageNo ()
@ 044.200 HPDFPRINT HMG_HPDF_PageNo () RIGHT SIZE 10 COLOR BLACK
@ 044.200 HPDFPRINT nCurrentPage RIGHT SIZE 10 COLOR BLACK


What happens is that both values ​​are NUMERIC,
and no numerical value is "printed" using the HaruPDF.

I had to convert to character and so, if it works.

@ NVeces +133.155 HPDFPRINT STR (HMG_HPDF_PageNo ())

Annex 2 routines (rules) that helped me when PDF design.
------------------------------------------------------------------

Code: Select all

//------------------------------------------------------------------------------
FUNCTION HPDFReglaH( nRenMM )
    LOCAL i1
    DEFAULT nRenMM:=4
    FOR i1=1 TO 215
        @ nRenMM,(000+i1)-1 HPDFPRINT IF(RIGHT(STR(INT(i1)),1)="0",ALLTRIM(STR(i1)), "") SIZE 6 COLOR BLACK
        @ nRenMM,000+i1 HPDFPRINT LINE TO IF( RIGHT( STR( INT( i1 ) ),1 )="0",nRenMM+007, ;
                                          IF( RIGHT( STR( INT( i1 ) ),1 )="5", nRenMM+005, nRenMM+4 ) ),000+i1 ;
                                          PENWIDTH .1 COLOR GRAY
    NEXT
RETURN( Nil )
FUNCTION HPDFReglaV( nColMM )
    LOCAL i1
    DEFAULT nColMM:=4
    FOR i1=1 TO 280
        @ 000+i1,nColMM-1 HPDFPRINT IF(RIGHT(STR(INT(i1)),1)="0",ALLTRIM(STR(i1)), "") SIZE 6 COLOR BLACK
        @ 000+i1,nColMM HPDFPRINT LINE TO 000+i1, IF( RIGHT( STR( INT( i1 ) ),1 )="0", nColMM+007, ;
                                                  IF( RIGHT( STR( INT( i1 ) ),1 )="5", nColMM+005, nColMM+4 ) ) ;
                                                  PENWIDTH .1 COLOR GRAY
    NEXT
RETURN( Nil )
//------------------------------------------------------------------------------

Re: Problema con HaruPDF

Posted: Thu Apr 18, 2013 10:41 pm
by danielmaximiliano
Gracias Andrés por compartir tus experiencias..

todavia no tengo la oportunidad de trabajar en la empresa con PDF.

Re: Problema con HaruPDF

Posted: Thu Apr 18, 2013 11:25 pm
by Leopoldo Blancas
Hola...

Se ven bien los PDF, voy en estos días a empezar a ver este tema...

Gracias por compartir.
Polo

Re: Problema con HaruPDF

Posted: Sat Apr 20, 2013 1:36 pm
by HASA
:o
Bom dia, em relação a acentuação alguma novidade ?
:mrgreen:
Hasa

Acentuação com a hmg_hpdf

Posted: Thu Apr 25, 2013 8:54 pm
by HASA
Olá pessoal por um acaso alguem conseguiu solucionar o problema ?
Desde já agradeço por essa maravilhosa ferramenta.
---
Hola gente de la oportunidad que alguien podría resolver el problema?
Le doy las gracias por esta maravillosa herramienta
:)
Hasa
[u]Moderator Notes[/u] (Pablo César) wrote:From this message below, was appended to an existing topic, which now both topics were unified..

Re: Acentuação com a hmg_hpdf

Posted: Tue Apr 30, 2013 2:28 pm
by HASA
:cry:
Ninguem ?, será que não tem solução ?
:?:
Hasa