22.03.2015 Views

DLI Implementation and Reference Guide - Datalogics

DLI Implementation and Reference Guide - Datalogics

DLI Implementation and Reference Guide - Datalogics

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

14.4 <strong>DLI</strong> <strong>Implementation</strong> <strong>and</strong> <strong>Reference</strong> <strong>Guide</strong><br />

From the full example on creating annotations, this segment shows the creation of an<br />

outline entry:<br />

Concepts <strong>and</strong> Facilities: <strong>Guide</strong> to the DL Pager Composition System<br />

"C" Example: Adding Outline Entries<br />

RootBookMark = dlpdfdocoutlineadd (Doc, NULL, NULL,<br />

"All Pages", TRUE, 0, "Fit", &PageRect, PDViewDestNULL);<br />

/* An annotation for each page, linking to display<br />

* entire page */<br />

Page1BookMark = dlpdfdocoutlineadd (Doc, RootBookMark, NULL,<br />

"Page 1", FALSE, 0, "Fit", &PageRect, PDViewDestNULL);<br />

dlpdfdocoutlineaddfromname<br />

This method is the same as the previous in its action <strong>and</strong> in its first 4 parameters. It<br />

differs in that the destination is specified as a text string, a name in the destination<br />

dictionary of the document. (See the previous section for adding names <strong>and</strong><br />

description of the use of name.)<br />

The following is an extract from the full example on annotations:<br />

"C" Example: Adding an Outline with a Named Destination<br />

dlpdfdocoutlineaddfromname (Doc, Page1BookMark, NULL,<br />

"Link to 2", FALSE, "Link1");<br />

Each time you create a DLPDFOUTLINE, a pointer to that structure is returned. You<br />

may keep these pointers in your own data structures as an aid in building the<br />

document tree, or you may navigate the existing structure using the following<br />

methods.<br />

dlpdfdocoutline<br />

This method accepts a document h<strong>and</strong>le, <strong>and</strong> returns the h<strong>and</strong>le of the root outline<br />

node. If there are no outlines, it will return a NULL pointer.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!