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

dlpdfpageaddtextannotation<br />

The simplest annotation in PDF is a text annotation. This appears as a “sticky note”<br />

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

in Adobe Acrobat or Adobe Reader <strong>and</strong> can be opened to display a text message.<br />

• The first parameter is a pointer to the page which will contain this annotation.<br />

• The second parameter is a pointer to an ASFixedRectangle whose upper left<br />

corner will be the upper left corner of the closed annotation.<br />

• The third is a pointer to a border specification.<br />

• The fourth is a pointer to a color specification.<br />

• The fifth is a pointer to a string, which will be used as a title of the opened<br />

annotation. This may be a NULL pointer.<br />

• The sixth parameter is a pointer to a string which is the content of this annotation.<br />

If this is a NULL pointer, the method will raise an exception (genErrBadParm).<br />

• Finally, the seventh parameter is a flag. If TRUE, then this annotation will be open<br />

when first displayed. If FALSE, it will be closed.<br />

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

"C" Example: Creating Text Annotations<br />

DLPDFDOC *Doc;<br />

DLPDFPAGE *Page1, *Page2;<br />

ASFixedRect NoteRect;<br />

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

dlpdfpageaddtextannotation (Page1, &NoteRect, Border,<br />

Color, "Page 1 Note",<br />

"This is a closed note placed on page one", FALSE);<br />

dlpdfpageaddtextannotation (Page2, &NoteRect, Border,<br />

Color, "Page 2 Note",<br />

"This is an open note placed on page Two", TRUE);<br />

dlpdfpageaddlinkannotation<br />

This is the most frequently used annotation. It links an area of the page which<br />

contains this annotation to a separate area on that or another page. The viewer uses

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

Saved successfully!

Ooh no, something went wrong!