Coordinates System and Graphic Units |
The ExpertPdf Anywhere document model uses the point (1/72 inch) as its graphic unit. All the coordinates and sizes of the page elements, pages, margins and templates are specified in points. When the size of an element is known in pixels (for example the size of an image or of an HTML page), it can be converted to points with the static methods of the UnitsConverter class. A pixel is 1/96 inch, the resolution a browser uses to lay out a web page:
public static float PointsToPixels(float points); public static float PixelsToPoints(float pixels);
The origin of the coordinates system is the top left corner of the drawable area of the page or template: on a page it is inside the page margins and below the document header template, if there is one. The positive X coordinates go to the right and the positive Y coordinates go down. The drawable area of a page or template is given by its ClientRectangle property.