Text Output

<< Click to Display Table of Contents >>

Navigation:  How To Use the VPE Control > VPE Python >

Text Output

Previous pageReturn to chapter overviewNext page

Internally, VPE processes ANSI strings, not Unicode. You provide UTF-8 encoded strings to VPE, but you must specify the charset that VPE shall use for string conversion, before using a non-western charset. See the property CharSet in this help file.

Example:

import os, sys

from VpeControl import *

 

doc = VpeControl()

doc.OpenDoc()

doc.Print(1, 1, "Hello World!")

doc.CharSet = VCHARSET_WIN_CYRILLIC                # switch to Cyrillic charset

doc.Print(1, 2, 'Международную')

doc.WriteDoc("hello world.pdf")