HPDFPRINT UNICODE

HMG Unicode versions 3.1.x related

Moderator: Rathinagiri

edk
Posts: 909
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: HPDFPRINT UNICODE

Post by edk »

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