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
on.
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
0x02000000
#define E_SYNTAX_ERROR 0x04000000
#define E_VALUE_ERROR
0x08000000
#define E_FONT_ERROR
0x10000000
#define E_FATAL_ERROR
0x20000000
#define E_FILE_ERROR
0x40000000
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.
GetErrLogMessageCount
Syntax:
SI32 pdfGetErrLogMessageCount(
const PPDF* IPDF) // Instance pointer
The function returns the number of error messages in the internal error log.
GetErrorMessage
Syntax:
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
SetOnErrorProc()).
 

Previous topic: GetEMFPatternDistance, GetErrLogMessage

Next topic: GetErrorMode, GetField (obsolete)