DynaPDF Manual - Page 351

Previous Page 350   Index   Next Page 352

Function Reference
Page 351 of 839
FindBookmark
Syntax:
SI32 pdfFindBookmark(
const PPDF* IPDF,
// Instance pointer
SI32 DestPage,
// Destination page used by the bookmark or -1
const char* Title) // The title of the bookmark or a part of it
This function searches for a bookmark in the document outline tree. If the parameter DestPage is
greater zero the function returns the handle of the first bookmark that uses this page number as
destination page.
If DestPage is smaller 1 the function returns the handle of the first bookmark that contains the
substring Title in the bookmark title. The substring Title is compared non-case-sensitive.
The parameter Title can be NULL, the function searches for bookmarks with no title in this case. To
search for the next bookmark with the same search parameters call FindNextBookmark().
It is safe to delete a found bookmark with DeleteBookmark() and continue the search run with
FindNextBookmark().
Remarks:
This function is implemented in an Ansi and Unicode compatible variant. Bookmarks can be stored
in Unicode or Ansi string format. The function searches always by using both encodings, so that a
bookmark can also be found if the Ansi variant of FindBookmark() was used, but the bookmark was
stored in Unicode or vice versa.
Return values:
If a bookmark can be found the return value is the bookmark handle, a value greater or equal zero.
If no bookmark can be found the return value is -1. If an error occurred, the return value is a
negative error code.
FindEmbeddedFile
Syntax:
SI32 pdfFindEmbeddedFile(
const PPDF* IPDF, // Instance pointer
const char* Name) // Name of the embedded file
The function searches for the embedded file Name and returns the handle of it when it can be found.
The file can then be extracted with GetEmbeddedFile().
Return values:
If the function succeeds the return value is an embedded file handle, a value greater or equal zero. If
the file cannot be found the return value is -1.
 

Previous topic: FileLink

Next topic: FindField, FindLinkAnnot