DynaPDF Manual - Page 391

Previous Page 390   Index   Next Page 392

Function Reference
Page 391 of 839
The error log was introduced with DynaPDF 3.0. It is used when reading a PDF file, e.g.
OpenImportFile(), ImportPage(), ImportPDFFile(), and when parsing or rendering PDF pages, e.g.
ParseContent(), IsEmptyPage(), IsColorPage(), GetPageText(), RasterPage(), RasterPDFFile(), and so
The members ErrCode and ErrType are set only if the error mode was set to emUseErrLog. See
SetErrorMode() for further information. ErrType is a bit mask that can contain the following flags:
#define E_WARNING
#define E_SYNTAX_ERROR 0x04000000
#define E_FONT_ERROR
#define E_FILE_ERROR
At time of publication only one flag is set at any one time. Future versions may be set multiple flags,
e.g. E_SYNTAX_ERROR and E_WARNING. Because of this, it is recommended to mask out the
error type with a bitwise and operator.
The number of possible error messages is restricted by default to 100 messages per PDF instance.
However, it is possible to adjust the maximum number of messages with SetMaxErrLogMsgCount().
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0. Check
whether the member StructSize of the structure TPDFError was properly initialized in the latter case.
SI32 pdfGetErrLogMessageCount(
const PPDF* IPDF) // Instance pointer
The function returns the number of error messages in the internal error log.
char* pdfGetErrorMessage(
const PPDF* IPDF) // Instance pointer
The function returns the last error message as pointer to a null-terminated static string, or NULL if
no error occurred. Use this function if an error callback function can not be used (see also

Previous topic: GetEMFPatternDistance, GetErrLogMessage

Next topic: GetErrorMode, GetField (obsolete)