Xojo Conferences

DynaPDF Manual - Page 477

Previous Page 476   Index   Next Page 478

Function Reference
Page 477 of 767
However, the normalized form is used in 99% of all available documents but it is also possible that a
document uses a non-normalized form. For instance, the media box can look like this:
= -100.0; // lower-left x
mediabox.Bottom = -100.0; // lower-left y
200.0; // upper-right x
200.0; // upper-right y
The size of the page that uses such a bounding box is 300 x 300 units. The problem is that the
coordinate origin lies at -100, -100. The page can also contain a crop box and the original page can be
rotated. This makes the handling more complicated.
When placing such a template with PlaceTemplate() on a page without further considerations the
result will be wrong because PlaceTemplate() does not consider the coordinate origin or the original
page orientation.
To simplify the work with imported templates PlaceTemplateEx() should be used instead. This
function considers the coordinate origin, crop box, and it preserves the original orientation when the
template is placed on a page. See PlaceTemplateEx() for further information.

Previous topic: Bounding boxes

Next topic: ImportPDFFile