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.

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

Collection of Areas<br />

In this example, the page content is divided into areas. Each area has a location<br />

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

relative to the top left of the page, a width, a depth <strong>and</strong> a rotation. Each area’s<br />

contents are specified as an X/Y coordinate relative to the top left of the area. For<br />

simplicity, assume that all data is in points <strong>and</strong> is in ASFixed format:<br />

"C" Example: Multiple Containers per Page with Rotation<br />

void WritePage (DLPDFDOC *Doc, ASFixed Width, ASFixed Depth,<br />

areadata *AreaData)<br />

{<br />

DLPDFPAGE *Page = dlpdfdoccreatepage (Doc, Width, Depth);<br />

areadata *CurrentArea = AreaData;<br />

while (AreaData)<br />

{<br />

DLPDFCONTENT *Content = dlpdfcontentcreate (Doc);<br />

dlpdcontenttranslate (Content, AreaData->X,<br />

Depth - AreaData->Y);<br />

dlpdfcontentrotate (Content, AreaData->Rotation);<br />

WriteLines (AreaData->UserData, Content);<br />

dlpdfcontenttopage (Content, Page);<br />

AreaData = AreaData->Next;<br />

}

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

Saved successfully!

Ooh no, something went wrong!