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.

Initializing <strong>and</strong> Terminating the Library 2.7<br />

Files In Memory Activation<br />

To increase the throughput of PDF generation, memory-mapped files may be used for temporary storage<br />

<strong>and</strong> for final output of the PDF content. Output of a PDF file to both memory <strong>and</strong> disk is also supported<br />

for environments where this feature is desired.<br />

In order to utilize Files In Memory (FIM), <strong>DLI</strong> must be initialized through the dlpdfinit function call,<br />

<strong>and</strong> the <strong>Datalogics</strong> memory file system must be passed to this function call. The memory file system may<br />

be obtained by calling the dlpdfmemfilesys function, detailed below (see “dlpdfmemfilesys” on<br />

page 2.9). This may be called before <strong>DLI</strong> (<strong>and</strong> hence the Adobe PDF Library) is initialized. Once set,<br />

storage of temporary files in memory is automatic.<br />

The <strong>DLI</strong> sample application MultiDoc, accompanying this release, demonstrates the coding <strong>and</strong> use of<br />

Files In Memory. It can be invoked by adding the comm<strong>and</strong>-line argument MEMORY when calling the<br />

sample application.<br />

Initializing <strong>and</strong> Terminating via <strong>DLI</strong><br />

The following comm<strong>and</strong>s should be used to initialize <strong>and</strong> terminate the Adobe PDF Library <strong>and</strong> <strong>DLI</strong>. In a<br />

single-threaded application, the initialization <strong>and</strong> termination processes must be called only once during<br />

the life of the application. Attempting to initialize the Adobe PDF Library <strong>and</strong> <strong>DLI</strong> more than once in the<br />

application may cause errors or unpredictable behavior, <strong>and</strong> is not supported. (You are free to create<br />

multiple documents <strong>and</strong>/or multiple files within the run, but the initialization <strong>and</strong> termination of the<br />

Adobe PDF Library <strong>and</strong> <strong>DLI</strong> is limited to one iteration of each. In a multi-threaded application, each<br />

thread must perform its own initialization <strong>and</strong> termination.)

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

Saved successfully!

Ooh no, something went wrong!