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.

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

Overview<br />

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

<strong>DLI</strong> provides a simple interface to create <strong>and</strong> write documents. It uses a document<br />

structure (DLPDFDOC) to differentiate between documents, allowing for the<br />

simultaneous creation of a number of documents. DLPDFDOC reflects the current<br />

status of the document at all times <strong>and</strong> is required input to most other <strong>DLI</strong> calls. As<br />

the document is created with Adobe PDF Library support, a CosDoc <strong>and</strong> a PDDoc<br />

are created within the Library, <strong>and</strong> these may be obtained from this structure for use<br />

in calls outside of <strong>DLI</strong>.<br />

The Adobe PDF Library establishes the name <strong>and</strong> many of the attributes of a<br />

document when it is completed, rather than when it is begun. Many existing<br />

composition engines do not do this. For this reason, the document structure has a<br />

convenient set of h<strong>and</strong>les to permit the specification of such attributes at document<br />

creation time, rather than at document write time.<br />

There are a number of calls available at the Document Interface. Multiple documents<br />

may be created <strong>and</strong> maintained at one time.<br />

Required Use of Exception H<strong>and</strong>lers<br />

Except for dlpdfinit <strong>and</strong> dlpdfterm, all calls to the Document Interface must be<br />

within an exception h<strong>and</strong>ler (i.e. DURING/HANDLER/END_HANDLER statements) <strong>and</strong><br />

all <strong>DLI</strong> documents should be destroyed prior to closing the Adobe PDF Library. This<br />

can be done all at once or one step at a time. Both <strong>DLI</strong> <strong>and</strong> the Adobe PDF Library<br />

may raise exceptions in the form of escapes.<br />

dlpdfinit <strong>and</strong> dlpdfterm must not be enclosed in these h<strong>and</strong>lers because they<br />

are not set up before initialization, <strong>and</strong> are freed during termination.<br />

dlpdfdoccreate<br />

This method will create <strong>and</strong> return a pointer to a new document, as a DLPDFDOC<br />

pointer. There are two parameters to this method, an ASBool <strong>and</strong> a pointer to a<br />

string, which are generally TRUE <strong>and</strong> NULL respectively. The first parameter, if

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

Saved successfully!

Ooh no, something went wrong!