Unicode and HMG_HPDF
Moderator: Rathinagiri
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Unicode and HMG_HPDF
Hi All
It's seems that HMG_HPDF doesn't support unicode
Is this correct and if so may be a hope for the future ?
Regards
It's seems that HMG_HPDF doesn't support unicode
Is this correct and if so may be a hope for the future ?
Regards
Viva INTERNATIONAL HMG
Re: Unicode and HMG_HPDF
Hi Esgici !
I see no problem
Regards
I see no problem
Code: Select all
cText_hbHpdf := hb_Translate( c_AnyString, 'UTF8EX', cMyCodePage )
M., Ronaldo
By: IMATECH
Imation Tecnologia
By: IMATECH
Imation Tecnologia
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: Unicode and HMG_HPDF
Thank Ronaldo, I will prob it.IMATECH wrote: I see no problem
Code: Select all
cText_hbHpdf := hb_Translate( c_AnyString, 'UTF8EX', cMyCodePage )
By the way my problem is on file name, not pdf text.
Regards
Viva INTERNATIONAL HMG
Re: Unicode and HMG_HPDF
Hi Esgici !
I Think you can use the same solution:
Regards
I Think you can use the same solution:
Code: Select all
c_file_name_for_pdf_File := hb_Translate( c_AnyString, 'UTF8EX', cMyCodePage )
M., Ronaldo
By: IMATECH
Imation Tecnologia
By: IMATECH
Imation Tecnologia
- danielmaximiliano
- Posts: 2618
- Joined: Fri Apr 09, 2010 4:53 pm
- Location: Argentina
- Contact:
Re: Unicode and HMG_HPDF
Gracias Ronaldo por compartir sus conocimientos
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: Unicode and HMG_HPDF
Hi All
the code :
Any idea
And, Ronaldo,
Would you like add your suggestions on this code,
( with required REQUEST statements and SETxxx commands / functions)
please.
Regards
This is my SSW :esgici wrote: It's seems that HMG_HPDF doesn't support unicode
the code :
Code: Select all
/*
Exploring UTF8 implementation in HMG_HPDF
*/
#include "hmg.ch"
#include "hfcl.ch"
PROCEDURE Main()
cSourceFileName := "español.txt"
cSourceText := HB_MEMOREAD( cSourceFileName )
cTargetFileName := STRTRAN( cSourceFileName, "txt", "pdf" )
SELECT HPDFDOC ( cTargetFileName ) TO lSelPDF // papersize HPDF_PAPER_A4
IF lSelPDF
START HPDFDOC
START HPDFPAGE
@ 20, 20 HPDFPRINT cSourceText
END HPDFPAGE
END HPDFDOC
IF FILE( cTargetFileName )
MsgInfo( "PDF Builded as " + cTargetFileName )
ELSE
MsgStop( "PDF Building Unsuccessful :(", "Unexpected ERROR !" )
ENDIF FILE( cTargetFileName )
ENDIF lSelPDF
RETURN // BTExplore.Main()
*-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.
And, Ronaldo,
Would you like add your suggestions on this code,
( with required REQUEST statements and SETxxx commands / functions)
please.
Regards
Viva INTERNATIONAL HMG
- Rathinagiri
- Posts: 5477
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Unicode and HMG_HPDF
Esgici,
As of now we can't use unicode with HPDF.
Claudio had also tested in a newer version of HPDF for unicode. We are investigating this and it is a main agenda for the upcoming versions.
As of now we can't use unicode with HPDF.
Claudio had also tested in a newer version of HPDF for unicode. We are investigating this and it is a main agenda for the upcoming versions.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: Unicode and HMG_HPDF
Thanks to clarification my brother,Rathinagiri wrote: As of now we can't use unicode with HPDF.
Claudio had also tested in a newer version of HPDF for unicode. We are investigating this and it is a main agenda for the upcoming versions.
you are UNIQUE
With my best reagrds
Viva INTERNATIONAL HMG
Re: Unicode and HMG_HPDF
Please do not forget the problem with the distance between the letters of the Greek words...
- Attachments
-
- gia_code.png (2.33 KiB) Viewed 14946 times
-
- gia.png (3.15 KiB) Viewed 14946 times
Best Regards,
Nikos.
os: Windows Server 2019 - 64
Nikos.
os: Windows Server 2019 - 64
Re: Unicode and HMG_HPDF
Hi Esgici !
Adjusted ( but not tested ! )
Regards
Adjusted ( but not tested ! )
Code: Select all
#include "hmg.ch"
#include "hfcl.ch"
PROCEDURE Main()
cSourceFileName := "español.txt"
cSourceText := hb_Translate( HB_MEMOREAD( cSourceFileName ), 'UTF8EX', 'ESISO' )
cTargetFileName := STRTRAN( cSourceFileName, "txt", "pdf" )
SELECT HPDFDOC ( hb_Translate( cTargetFileName, 'UTF8EX', 'ESISO' ) ) TO lSelPDF // papersize HPDF_PAPER_A4
IF lSelPDF
_HMG_HPDF_SetEncoding( "WinAnsiEncoding" )
START HPDFDOC
START HPDFPAGE
@ 20, 20 HPDFPRINT cSourceText
END HPDFPAGE
END HPDFDOC
IF FILE( cTargetFileName )
MsgInfo( "PDF Builded as " + cTargetFileName )
ELSE
MsgStop( "PDF Building Unsuccessful :(", "Unexpected ERROR !" )
ENDIF FILE( cTargetFileName )
ENDIF lSelPDF
RETURN
// *---------------------------------------------------------------------------*
// hb_gtsys()
// *---------------------------------------------------------------------------*
PROCEDURE hb_gtsys()
REQUEST HB_LANG_ES
REQUEST HB_CODEPAGE_ESISO
RETURN
Regards
M., Ronaldo
By: IMATECH
Imation Tecnologia
By: IMATECH
Imation Tecnologia