This documentation is deprecated and will no longer be updated. Please use the official documentation at vanillapdf.readthedocs.io.
Vanilla.PDF  2.3.0
Cross-platform toolkit for creating and modifying PDF documents
c_text_string_encoding.h
Go to the documentation of this file.
1#ifndef _C_TEXT_STRING_ENCODING_H
2#define _C_TEXT_STRING_ENCODING_H
3
6
7#ifdef __cplusplus
8extern "C"
9{
10#endif
11
23 typedef enum {
24 TextStringEncodingType_Undefined = 0,
25
31
37
44
52 VANILLAPDF_API error_type CALLING_CONVENTION TextStringEncoding_Detect(string_type data, size_type size, TextStringEncodingType* result);
53
61 VANILLAPDF_API error_type CALLING_CONVENTION TextStringEncoding_PDFDocEncodingByteToUnicode(uint8_t byte, uint32_t* codepoint);
62
63#ifdef __cplusplus
64};
65#endif
66
67#endif /* _C_TEXT_STRING_ENCODING_H */
This file contains macro declarations for importing and exporting symbols from library boundaries.
TextStringEncodingType
Encoding types for PDF text strings (PDF spec 7.9.2.2).
Definition c_text_string_encoding.h:23
@ TextStringEncodingType_UTF16BE
UTF-16 big-endian encoding. Indicated by byte order mark 0xFEFF at the start of the string.
Definition c_text_string_encoding.h:36
@ TextStringEncodingType_PDFDocEncoding
Single-byte encoding defined in PDF spec Table D.2. No byte order mark is present.
Definition c_text_string_encoding.h:30
@ TextStringEncodingType_UTF8
UTF-8 encoding (PDF 2.0). Indicated by byte order mark 0xEFBBBF at the start of the string.
Definition c_text_string_encoding.h:42
This file contains types and constants used as parameters or return values.
uint32_t error_type
This is return value type of all API functions.
Definition c_types.h:25
uint32_t size_type
Size type defined in standard library.
Definition c_types.h:62
const char * string_type
C-Style string.
Definition c_types.h:82
error_type CALLING_CONVENTION TextStringEncoding_PDFDocEncodingByteToUnicode(uint8_t byte, uint32_t *codepoint)
Map a single PDFDocEncoding byte to its Unicode code point.
error_type CALLING_CONVENTION TextStringEncoding_Detect(string_type data, size_type size, TextStringEncodingType *result)
Detect the encoding of a PDF text string from its raw bytes.