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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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

dlpdfdocnameadd<br />

This method allows the user to add one destination to the name tree structure, the<br />

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

optional ordered list of names <strong>and</strong> destinations.<br />

The method accepts four parameters:<br />

• The first is a h<strong>and</strong>le for the document in which the name is to reside.<br />

• The second is a string representing the tree name (can be NULL).<br />

• The third is a string containing the destination name.<br />

• The fourth is a COS structure, which must be an array with contents as described in<br />

the PDF Specification, section 7.3.1.<br />

"C" Example: Creating A Named Destination<br />

/* Create a Destination structure to fit a given rectangle to<br />

* the viewer window */<br />

Dest = CosNewarray (Doc, TRUE, 6);<br />

CosArrayPut (Dest, 0, Page); /* The current page */<br />

CosArrayPut (Dest, 1, CosNewName (Doc, FALSE,<br />

ASAtomFromString (“FitR”)));<br />

CosArrayPut (Dest, 2, CosNewFixed (Doc, FALSE, Left));<br />

CosArrayPut (Dest, 3, CosNewFixed (Doc, FALSE, Bottom));<br />

CosArrayPut (Dest, 4, CosNewFixed (Doc, FALSE, Right));<br />

CosArrayPut (Dest, 5, CosNewFixed (Doc, FALSE, Top));<br />

dlpdfdocnameadd (Doc, "Name Tree", "Destination Name",<br />

Dest);<br />

dlpdfdocnamefind<br />

This method will return the Cos structure associated with a destination name. If that<br />

name does not exist, a CosNull structure will be returned.<br />

The method accepts two parameters:<br />

• a document h<strong>and</strong>le<br />

• a string containing the desired name

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

Saved successfully!

Ooh no, something went wrong!