home | download | documentation | examples | sourceforge | forums

## Encoder

### HPDF_Encoder_GetType

#include "apdf.h"
HPDF_EncoderType
HPDF_Encoder_GetType (HPDF_Encoder encoder);

#### Description

HPDF_Encoder_GetTyp() gets the type of an encoding object.

#### Parameter

encoder
The handle of an encoding object.

#### Returns

HPDF_Encoder_GetType() returns one of the following values.

| VALUE | DESCRIPTION
1 | HPDF_ENCODER_TYPE_SINGLE_BYTE | This encoder is an encoder for single byte characters.
2 | HPDF_ENCODER_TYPE_DOUBLE_BYTE | This encoder is an encoder for multi byte characters.
3 | HPDF_ENCODER_TYPE_UNINITIALIZED | This encoder is uninitialized. (May be it is an encoder for multi byte characters.)
4 | HPDF_ENCODER_UNKNOWN | Invalid encoder.

### HPDF_Encoder_GetByteType

#include "apdf.h"
HPDF_ByteType
HPDF_Encoder_GetByteType (HPDF_Encoder encoder,
const char *text,
HPDF_UINT index);

#### Description

HPDF_Encoder_GetByteType() returns the type of byte in the text at position index.

#### Parameter

encoder
The handle of an encoding object.

#### Returns

HPDF_Encoder_GetByteType() returns one of the following values.

| VALUE | DESCRIPTION
1 | HPDF_BYTE_TYPE_SINGLE | Single byte character.
2 | HPDF_BYTE_TYPE_LEAD | Lead byte of a double-byte character.
3 | HPDF_BYTE_TYPE_TRIAL | Trailing byte of a double-byte character.
4 | HPDF_BYTE_TYPE_UNKNOWN | Invalid encoder or cannot judge the byte type.

### HPDF_Encoder_GetUnicode

#include "apdf.h"
HPDF_UNICODE
HPDF_Encoder_GetUnicode (HPDF_Encoder encoder,
HPDF_UINT16 code);

#### Description

HPDF_Encoder_GetUnicode() converts a specified character code to unicode.

#### Parameter

encoder
The handle of an encoding object.
code
A character code to convert.

#### Returns

HPDF_Encoder_GetUnicode() returns one of the following values.

### HPDF_Encoder_GetWritingMode

#include "apdf.h"
HPDF_WritingMode
HPDF_Encoder_GetWritingMode (HPDF_Encoder encoder);

#### Description

HPDF_Encoder_GetWritingMode() returns the writing mode for the encoding object.

#### Parameter

encoder
The handle of an encoding object.

#### Returns

HPDF_Encoder_GetWritingMode() returns one of the following values.

| VALUE | DESCRIPTION
1 | HPDF_WMODE_HORIZONTAL | horizontal writing mode.
2 | HPDF_WMODE_VERTICAL | vertical writing mode;