DynaPDF Manual - Page 359

Previous Page 358   Index   Next Page 360

Function Reference
Page 359 of 777
double pdfGetEMFPatternDistance(
const PPDF* IPDF) // Instance pointer
The function returns the distance between lines of standard patterns during EMF conversion.
Default value = 4.0
LBOOL pdfGetErrLogMessage(
const PPDF* IPDF,
// Instance pointer
UI32 Index,
// Array index
struct TPDFError* Err) // see below
struct TPDFError
StructSize; // Must be initialized to sizeof(TPDFError)
const char* Message;
// The error message
// PDF object number or -1 if not available
// File offset or -1 if not available
const char* SrcFile;
// Source file
// Source line
The function returns an error object of the internal error log. The function GetErrLogMessageCount()
returns the number of available error messages.
DynaPDF uses the error log to store non-fatal errors or warnings when it is not required to break
processing or if more detailed error information should be provided than is possible with the normal
exception handling.
For example, when opening a damaged PDF file with OpenImportFile() the function tries first to
open the file in normal mode. All errors which occur in this step are written to the error log.
Depending on the kind of found errors, the function maybe falls back into repair mode and reads the
file again. If this action is successful then the function returns with success and no error message is
provided over the normal exception handling. So, you'll not notice that the file contained damages
unless you take a look into the error log.
The error log was introduced with DynaPDF 3.0. It is currently 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. However, the error log will be integrated in all functions which can produce multiple warnings
like InsertImage(), InsertMetafile(), AddOutputIntent() and so on.
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().

Previous topic: GetFileSpec

Next topic: GetErrLogMessageCount, GetErrorMessage, GetErrorMode