Rathinagiri wrote:Actually, what is your problem?
The problem is not making brazilian or spanish accents (especial characters from the language). I have tested in HMG 3.0.46 and 3.1.3 in UNICODE and ANSI code. But sadly, do not work with accents with harupdf.
This is a code example:
Code: Select all
#include <hmg.ch>
#include "HFCL.CH"
Function Main
// SET LANGUAGE TO PORTUGUESE
define window main at 0, 0 width 300 height 300 main title 'HMG HPDF Document'
define button create
row 100
col 90
width 120
caption 'HMG HPDF DOC'
action pdf_create()
end button
on key escape action thiswindow.release
end window
main.center
main.activate
Return nil
function pdf_create
local lSuccess := .f.
local cContent, cSyntax
local cLB := chr( 10 )
SELECT HPDFDOC 'HMG_HPDF_Doc.pdf' TO lSuccess papersize HPDF_PAPER_A4
SET HPDFDOC COMPRESS ALL
SET HPDFDOC PAGEMODE TO OUTLINE
SET HPDFINFO AUTHOR TO 'S. Rathinagiri'
SET HPDFINFO CREATOR TO 'S. Rathinagiri'
SET HPDFINFO TITLE TO 'HMG_HPDF Documentation'
SET HPDFINFO SUBJECT TO 'Documentation of LibHaru/HPDF Library in HMG'
SET HPDFINFO KEYWORDS TO 'HMG, HPDF, Documentation, LibHaru, Harbour, MiniGUI'
SET HPDFINFO DATECREATED TO date() TIME time()
if lSuccess
START HPDFDOC
START HPDFPAGE
@ 126, 10 HPDFPRINT IMAGE "hmghpdf.png" WIDTH 190 HEIGHT 46
END HPDFPAGE
START HPDFPAGE
SET HPDFDOC PAGEOUTLINE TITLE "Introduction"
Draw_HeaderBox()
Print_Header( "HMG_HPDF Introdução / Intoducción" )
cContent := " HMG_HPDF is a small library to create PDF documents in a simple way using xBase syntax. " + ;
"Output from HMG programs can be exported to PDF with HMG PRINT like commands. Apart from HMG PRINT " +;
"features this library has some additional features also." + ;
cLB + ;
cLB + ;
" It is based on HPDF in Harbour. HPDF is originally ported from LibHaru to Harbour." +;
cLB + ;
cLB + ;
"USAGE:" + ;
cLB + ;
cLB + ;
" Just by including the following line into the initial lines of the HMG code, the commands discussed in this" + ;
" document can be used. " + ;
cLB + ;
cLB + ;
'#include "hmg_hpdf.ch"'
Print_Content( cContent )
END HPDFPAGE
END HPDFDOC
endif
execute file 'HMG_HPDF_Doc.pdf'
return nil
static function Draw_HeaderBox
@ 10, 10 HPDFPRINT RECTANGLE TO 40, 200 COLOR { 50, 50, 255 } FILLED
return nil
static function Print_Header( cHeader )
@ 30, 105 HPDFPRINT cHeader SIZE 30 COLOR { 255, 255, 0 } CENTER
return nil
static function Print_Content( cContent)
@ 50, 10 HPDFPRINT cContent TO 120, 200 //JUSTIFY
return nil
Look at this is wrong characteres displayed:
- Screen93.PNG (28.84 KiB) Viewed 12096 times
And this is the right ones to be displayed (this was made by PaintBrush):
- Screen94.PNG (28.87 KiB) Viewed 12093 times
So it is somthing wrong and now with UNICODE most probably will be so usefull if accents characters could be displayed in good order...