DynaPDF Manual - Page 833
Previous Page 832 Index Next Page 834
Function Reference
Page 833 of 860
TestGlyphs
Syntax:
SI32 pdfTestGlyphs(
const PPDF* IPDF, // Instance pointer
SI32 FontHandle,
// Font handle
const char* Text) // Text that should be tested
The function checks whether all glyphs of the text are available in the specified font. The return
value is the position of the first missing glyph, or -1 if all glyphs are available.
If the font uses a mixed 8/16 bit CJK code page that requires a conversion to Unicode (a code page
that ends with "_Uni"), the return value corresponds to the converted Unicode string and not to the
CJK input string.
TestGlyphsEx
Syntax:
SI32 pdfTestGlyphsEx(
const PPDF* IPDF, // Instance pointer
SI32 FontHandle,
// Font handle
const char* Text, // Text that should be tested
UI32 Len)
// Text length in characters
The function checks whether all glyphs of the text are available in the specified font like
TestGlyphs() but it accepts a non-null-terminated string as input. The return value is the position of
the first missing glyph, or -1 if all glyphs are available.
If the font uses a mixed 8/16 bit CJK code page that requires a conversion to Unicode (a code page
that ends with "_Uni"), the return value corresponds to the converted Unicode string and not to the
CJK input string.
TestPassword
Syntax:
LBOOL pdfTestPassword(
const PPDF* IPDF,
// Instance pointer
TPwdType PwdType,
// Password type
const char* Value) // Password as Ansi or UTF8 string, see description
The main purpose of the function is to test the file against the owner password if the encryption
settings should be changed by the user. It is not meaningful to call this function for non-encrypted
files. To determine whether a PDF file is encrypted call GetInIsEncrypted().
Remarks (C/C++ only):
It is recommended to enable UTF8 support temporarily by setting the flag gfAnsiStringIsUTF8 with
SetGStateFlags() before calling this function. The password must of course also be converted to
UTF8 before calling the function in this case.
Previous topic: StrokePath
Next topic: TextAnnot