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.

Containers within Pages 7.3<br />

Simplest Container Case<br />

In the simplest case, all of the composed data contain X/Y coordinates in (points * 100), calculated<br />

from the lower left h<strong>and</strong> corner of the page:<br />

"C" Example: Simplest Container Case<br />

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

userdata *UserData)<br />

{<br />

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

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

USERDATA *UserWork = UserData;<br />

while (UserWork)<br />

{<br />

WriteLine (UserWork, Content);<br />

UserWork = UserWork->next;<br />

}<br />

}<br />

dlpdfcontenttopage (Content, Page);<br />

Scaling<br />

This case assumes all of the above, but distances are in (points * 10) vertically <strong>and</strong> (points *<br />

1000) horizontally. Note that all of your distances, including point sizes <strong>and</strong> font widths, must conform<br />

to this for this single simple solution:<br />

"C" Example: Container with Scale<br />

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

userdata *UserData)<br />

{<br />

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

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

}<br />

dlpdfcontentscale (Content,<br />

FloatToFixed (1/ 1000),<br />

FloatToFixed (1/10));<br />

USERDATA *UserWork = UserData;<br />

while (UserWork)<br />

{<br />

WriteLine (UserWork, Content);<br />

UserWork = UserWork->next;<br />

}<br />

dlpdfcontenttopage (Content, Page);

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

Saved successfully!

Ooh no, something went wrong!