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.10 <strong>DLI</strong> <strong>Implementation</strong> <strong>and</strong> <strong>Reference</strong> <strong>Guide</strong><br />

"C" Example: Modifying a Goto Link into a GotoR Link<br />

/* Create a link to another document */<br />

local_inserttext (Doc, Content1, &gState,<br />

"Link Concepts to Line <strong>and</strong> Drawing Facilities: Sample", <strong>Guide</strong> to fixedFour the DL Pager * 72, Composition System<br />

fixedEight * 72, &BBLink3);<br />

CosLink3 = dlpdfpageaddlinkannotation (Page1, &BBLink3,<br />

Border, Color, 0, "XYZ", &BBLink3, PDViewDestNULL);<br />

CosDictRemove (CosLink3, ASAtomFromString ("Dest"));<br />

Action = CosNewDict (Doc->cosDoc, TRUE, 3);<br />

CosDictPut (CosLink3, ASAtomFromString ("A"), Action);<br />

CosDictPut (Action, ASAtomFromString ("Type"),<br />

CosNewName (Doc->cosDoc, FALSE,<br />

ASAtomFromString ("Action")));<br />

CosDictPut (Action, ASAtomFromString ("S"),<br />

CosNewName (Doc->cosDoc, FALSE,<br />

ASAtomFromString ("GoToR")));<br />

Dest = CosNewArray (Doc->cosDoc, FALSE, 2);<br />

CosArrayPut (Dest, 0, CosNewInteger (Doc->cosDoc,<br />

FALSE, 0));<br />

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

ASAtomFromString ("Fit")));<br />

CosDictPut (Action, ASAtomFromString ("D"),Dest);<br />

CosDictPut (Action, ASAtomFromString ("F"),<br />

CosNewString (Doc->cosDoc, FALSE,<br />

"ExampleDraw1.pdf", 16));

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

Saved successfully!

Ooh no, something went wrong!