The document Units
and TopDown
properties allow you to use units of measurement like mm or cm.
They also allow you to invert the coordinate system so that distances
are measured down from the top rather than up from the bottom.
These properties enable an abstraction designed to make layout
easier. However the underlying units of measurement and page layout
remain the same.
When you call a page layout operation like AddText
or FrameRect
your abstracted coordinates are translated into PDF coordinates
before the object is inserted into the document.
For most layout tasks you can ignore the translation. However if
you are using low-level access to the PDF structure or if you are
using Transforms
then you need to be aware of it.
Suppose you call FrameRect
and then extract the raw content stream from the returned object.
You must be aware that the base coordinates included in the stream
are measured in the PDF coordinate space and not in your current
coordinate system.
Document Transforms operate on the native PDF coordinate space.
So when you specify a rotation around the origin - the origin specified
is at the bottom left of the document - not the top.
|