Page 4 of 6
Re: Problema con HaruPDF
Posted: Tue Jun 04, 2013 9:41 pm
by andyglezl
Gracias IMATECH y Pablo Cesar, con esto se soluciona !
_HMG_HPDF_SetEncoding ("ISO8859-3") .
porque con _HMG_HPDF_SetEncoding(WinAnsiEncoding) me da error en
"WinAnsiEncoding", me faltara un Include ?
claro, hay que seguir utilizando HB_OEMTOANSI()
-----------------------------------------------
Thanks IMATECH and Pablo Cesar, this solves!
_HMG_HPDF_SetEncoding ("ISO8859-3").
because _HMG_HPDF_SetEncoding (WinAnsiEncoding) gives me error
"WinAnsiEncoding", Include me missing one?
course, we must continue using HB_OEMTOANSI()
Problema con HaruPDF
Posted: Tue Jun 04, 2013 10:40 pm
by Pablo César
andyglezl wrote:con _HMG_HPDF_SetEncoding(WinAnsiEncoding) me da error en
"WinAnsiEncoding", me faltara un Include ?
Ohhh disculpa, poné
WinAnsiEncoding entre aspas. Es lo que está faltando.
---
Ohhh sorry, pls put
WinAnsiEncoding between blades. It's what's missing.
Re: Problema con HaruPDF
Posted: Wed Jun 05, 2013 4:51 pm
by HASA
Buenas tardes Pablo y otros colegas que acompañan este post puede haber creado un malentendido porque yo uso la EXTEND MiniGUI y el personal no proporcionado o el ejemplo que fue tomado de la HMG archivo HMG_PDF.PRG tiene algunas líneas de código para oFont: HPDF_GetFont = (_HMG_HPDFDATA [1] [1], CFont, NIL), después de mucho puntas de prueba de sus colegas compararon otro ejemplo de impresión que utiliza HARUPDF como base y descubrió que en vez de NIL usan "CP1252", por lo que cambió todas las llamadas fuentes de oFont: = HPDF_GetFont (_HMG_HPDFDATA [1] [1], CFont, "CP1252"), y supongo que lo que "BINGO" dio correctamente, en el ejemplo con el Extend MiniGUI ha function () _HMG_HPDF_SetEncoding y destacó, por lo que decidí comparar línea por línea y funcionó, gracias a otros compañeros que trataron de ayudar y es un consejo para otros, este "CP1252" no sé si es por PORTUGUÉS, pero ... trabajado
HASA
Good afternoon Pablo and other colleagues that accompany this post I may have created some misunderstanding because I use the EXTEND MiniGUI and staff there provided or example that was borrowed from HMG HMG_PDF.PRG file has some lines of code so oFont: HPDF_GetFont = (_HMG_HPDFDATA [1] [1], CFont, NIL) after much testing tips from colleagues compared another example of printing that uses HARUPDF as a base and discovered that instead of NIL they use "CP1252", so I changed all the calls sources for oFont: = HPDF_GetFont (_HMG_HPDFDATA [1] [1], CFont, "CP1252"), and guess what "BINGO" gave correctly, in the example with the Extend MiniGUI has _HMG_HPDF_SetEncoding function () and stressed, so I decided to compare line by line and it worked, thanks to other colleagues who tried to help and is a tip for others, this "CP1252" I do not know if it's for PORTUGUESE, but ... worked
HASA
Re: Problema con HaruPDF
Posted: Wed Jun 05, 2013 8:02 pm
by EduardoLuis
Hi Hasa:
Try this (it works perfectly for me under HMG 3.046)
After the instruction:
START HPDFDOC
I insert this line:
SET HPDFDOC ENCODING TO "CP1252"
And thats all.-
Be aware that ANSI char does not work well under HMG 3.10 or later.-
If you are using HMG 3.10 or later, perform HPDF.EXE with HMG 3.046 and call this exe from your principal.EXE (made with HMG 3.13).- This method works well for me.-
I hope this will be usefull for you.
Eduardo.
Re: Problema con HaruPDF
Posted: Sat Jun 08, 2013 9:56 pm
by jairpinho
external source when using only the first line arrow
@ 15, 18 HPDFPRINT cNome FONT cFonte1 size 15 COLOR { 50, 5, 255 } // CENTER
@ 23, 12 HPDFPRINT cEndereco FONT cFonte1 size 12 COLOR { 0, 0, 0 } // CENTER does not work
Code: Select all
function CRIA_PDF()
local lSuccess := .f.
local cLB := chr( 10 )
lOCAL cArquivo := "OFERTA.pdf"
Local cFonte1:= "Arialbd.ttf"
SELECT HPDFDOC cArquivo TO lSuccess papersize HPDF_PAPER_A4
SET HPDFDOC COMPRESS ALL
SET HPDFDOC PAGEMODE TO OUTLINE
SET HPDFINFO AUTHOR TO 'Jair Pinho'
SET HPDFINFO CREATOR TO 'Jair Pinho'
SET HPDFINFO TITLE TO 'OFERTA'
SET HPDFINFO SUBJECT TO 'Criado com LibHaru/HPDF Library'
SET HPDFINFO KEYWORDS TO 'HMG, HPDF, Documentation, LibHaru, Harbour, MiniGUI'
SET HPDFINFO DATECREATED TO date() TIME time()
SET HPDFDOC ENCODING TO "WinAnsiEncoding"
if lSuccess
START HPDFPAGE
SET HPDFDOC PAGEOUTLINE TITLE "Oferta"
// Draw_HeaderBox()
// Print_Header( "HMG_HPDF Introduction" )
*--------------- Rectangulo com Sombra e Dados do Remetente -----------*
@ 8, 10 HPDFPRINT RECTANGLE TO 47, 120 PENWIDTH 0.2 COLOR { 0, 0, 0 }
cNome := "TechWorks Automações & TI"
cEndereco := "RUA ERNESTO GOMES"
@ 15, 18 HPDFPRINT cNome FONT cFonte1 size 15 COLOR { 50, 5, 255 } // CENTER
@ 23, 12 HPDFPRINT cEndereco FONT cFonte1 size 12 COLOR { 0, 0, 0 } // CENTER
END HPDFDOC
endif
execute file cArquivo
return nil
Re: Problema con HaruPDF
Posted: Sun Jun 09, 2013 12:10 pm
by Rathinagiri
This is a bug in the HMG HPDF library. Fonts once registered need not be registered again. I will fix this soon. Thanks for reporting.
HMG 3.1.4 (Test)
Posted: Tue Jun 18, 2013 2:08 pm
by Pablo César
EduardoLuis wrote:Rati: i've tested HMGDOC and as in previous versions except 3.46 it's not possible to put / print spanish characters.- Till now this is the only bug i found.-
Hi Eduardo ! Could you be more specific ? I do not understand. I did not found HMGDOC sample, which one ? Are you refering
about this ?
Hola Eduardo, poderias ser más específico por favor ? No entendi en cual ejemplo te baseas. Seria C:\hmg.3.1.4\hfcl\Samples\HMGHPDFDoc\demo.Prg, este ?
Te refieres
a esto ?
Re: HMG 3.1.4 (Test)
Posted: Tue Jun 18, 2013 2:44 pm
by EduardoLuis
Hola PabloCesar:
En efecto, quise sintetizar el comentario.-
En el HMGPDFDOC, sigue presentándose el mismo problema que en las versiones 3.1X, cuando intentas imprimir caracteres en español, son sustituidos por caracteres gráficos no ANSI, no importa si son parte de la definición del formulario o un dato proveniente de una tabla.-
La utilidad HMGPDFDOC es extraordinaria, por lo que la he investigado mucho desde que Rati la puso en el foro, y lo adopté como método único para todas las salidas de impresión de mis desarrollos.- En la versión 3.046 funciona perfecto, por lo que todo proceso de datos lo desarrollo bajo HMG 3.1X y solo la impresión bajo HMG 3.046, al menos mientras la incompatibilidad continue.- No es lo ideal, pero funciona.-
Espero haber aclarado mi error.-
Un abrazo. Eduardo
Hi PabloCesar:
You are right; my mistake becomes from trying to sintesize my comment.
As in previous versions 3.1X, when you try to print spanish characters, this ones are substituted by graphics different from ANSI ones, no mather if those characters are part of the form or becoming from a database (table).-
Since Rati upload HMGPDFDOC, one of the best tools for HMG, i've investigate it in deep, and choose it to perform all printing routines on my developes.-
HMGPDFDOC under HMG 3.046 works perfectly, so i decide to develope and EXE only for printing routines.- I know this is not the right way, but it works fine.-
Hopping i'll put crystal clear on my comment, with regards, Eduardo.-
Re: HMG 3.1.4 (Test)
Posted: Tue Jun 18, 2013 3:01 pm
by Pablo César
Hola Eduardo, ya tentaste con:
_HMG_HPDF_SetEncoding ("ISO8859-3") o
_HMG_HPDF_SetEncoding("WinAnsiEncoding") ? Leíste
este mensaje ? Y debo creer que tambien habrás cambiado la codificacion en tu editor de texto para UTF-8 ? Compilá y decinos si te funcionó...
--
Hi Eduardo, did you tried with:
_HMG_HPDF_SetEncoding ("ISO8859-3") or
_HMG_HPDF_SetEncoding("WinAnsiEncoding") ? Have you read
this message ? I should believe that you have already changed your source editor to UTF-8 ? Build it and tell us if it have worked...
Re: HMG 3.1.4 (Test)
Posted: Tue Jun 18, 2013 5:14 pm
by EduardoLuis
Hola PabloCésar:
En efecto ya había realizado el test cuando publicaron ese post, y el resultado fue negativo.-
Adjunto archivo JPG con el resultado.- Los caracteres en castellano incluidos fueron ñ Ñ á é í ó y ú, en ese exacto orden.-
Tampoco tomó el seteo que utilizo en HMG 3.046 ó sea:
SET HPDFDOC ENCODING TO "CP1252" y el resultado fue el mismo.-
Un abrazo. Eduardo
Hi PabloCésar:
I've test the suggestion post, but the result was also negative.-
I attach JPG file where i show PDF result.-
Characters in spanish includes on PDF file where: ñ Ñ á é í and ú in that exact order.-
I also tried encoding i'm using under HMG 3.046, for example:
SET HPDFDOC ENCODING TO "CP1252" and the result was the same.-
With regards. Eduardo