HPDFPRINT UNICODE

HMG Unicode versions 3.1.x related

Moderator: Rathinagiri

edk
Posts: 217
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland
Has thanked: 63 times
Been thanked: 154 times

Re: HPDFPRINT UNICODE

Post by edk » Fri Dec 08, 2017 11:59 am

You do not have to convert all code to ANSI. The entire source code can be in UNICODE.
I mean, you can only convert content when you create a PDF.

Code: Select all

[Main program]

[Some function]
(...)

//temporary switch to CP1250, only for create PDF
SET CODEPAGE TO SLOVENIAN

SELECT HPDFDOC "example.pdf" TO lSuccess PAPERSIZE HPDF_PAPER_A4
IF lSuccess
	SET HPDFDOC ENCODING TO "CP1250"
	START HPDFDOC
	START HPDFPAGE
	@ 01, 10 HPDFPRINT hb_Utf8ToStr( AnyStringInUnicode )
	@ 20, 10 HPDFPRINT hb_Utf8ToStr( AnotherAnyStringInUnicode )
	(...)
	END HPDFPAGE
        END HPDFDOC
ENDIF
SET CODEPAGE TO UNICODE	//back to UNICODE
(...)
RETURN


Post Reply