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.

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

From the full example of creating annotations:<br />

"C" Example: Creating Concepts A Link <strong>and</strong> Annotation Facilities: <strong>Guide</strong> to the DL Pager Composition System<br />

DLPDFPAGE *Page1<br />

ASFixedRect BBLink1, PageRect;<br />

ASFixed Border[3], Color[3];<br />

/* Set up the border <strong>and</strong> color arrays */<br />

Border[0] = Border[1] = 0; /* This is a square box */<br />

Border[2] = fixedTwo; /* Two points in thickness */<br />

Color[0] = Color[2] = 0; /* Its color will be blue */<br />

Color[1] = fixedOne;<br />

dlpdfpageaddlinkannotation (Page1, &BBLink1, Border,<br />

Color, 1, "Fit", &PageRect, PDViewDestNULL);<br />

dlpdfpageaddlinkannotationfromname<br />

An optional structure within the PDF document is a name tree. This consists of an<br />

ordered collection of strings (names) <strong>and</strong> a value for each name, which is an array in<br />

the form defined in the PDF Specification, section 7.3.1. The named destination itself<br />

is described in sections 7.3.2 <strong>and</strong> 6.9.<br />

In the Adobe PDF Library, only the DEST name tree may be defined, <strong>and</strong> within <strong>DLI</strong>,<br />

there is direct support only for the name tree. Names may be added to the name tree<br />

via dlpdfdocnameadd.<br />

Names vs. Destinations<br />

A link may be accomplished using a name, rather than a specific destination. When<br />

cross-document links are to be used, referring to a name permits a more flexible<br />

linkage: if the document referred to is modified, you need not recompose the referring<br />

documents.<br />

In practice, this means that you would need to create a name tree which names all of<br />

the possible interesting sites for a link, <strong>and</strong> publish the names of those sites to<br />

potential linking documents. These names should be derived directly from the text, to

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

Saved successfully!

Ooh no, something went wrong!