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.

Working with Content 8.21<br />

The typical scaling calculation using values returned by dlpdfimagegetsize<br />

would be to divide the intended print size by the image size on each axis; e.g.<br />

dlpdfcontentreferenceimage(Content, Image,<br />

Int32ToFixed(72), Int32ToFixed(92), 0,<br />

ASFixedDiv(xPoints, Int32ToFixed(xRasters)),<br />

ASFixedDiv(yPoints, Int32ToFixed(yRasters)));<br />

An image in which each pixel of each raster line represents one PDF unit of output<br />

will return the same values for both image dimension (xRasters <strong>and</strong> yRasters)<br />

<strong>and</strong> print size (xPoints <strong>and</strong> yPoints), <strong>and</strong> thus a Scale Factor of 1 on both axes.<br />

dlpdfimagegetsize<br />

The Scale Factors specified in dlpdfcontentreferenceimage will determine the<br />

resulting size of the image. This method gives you the image information necessary to<br />

calculate those values, dividing the intended print size by the file size for each<br />

dimension. This yields a Scale Factor ratio which dlpdfcontentreferenceimage<br />

uses to calculate the final output image size.<br />

Associating Content to Page<br />

The dlpdfcontenttopage call places the content onto a page. Once made, the<br />

content is no longer accessible via the <strong>DLI</strong> Package, <strong>and</strong> the pointer to the content<br />

structure is no longer valid.<br />

dlpdfcontenttopage<br />

This procedure will make the markings placed into content a part of the specified<br />

page. Following this call, the content structure no longer exists: pointers to it are then<br />

invalid <strong>and</strong> should no longer be used.

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

Saved successfully!

Ooh no, something went wrong!