Click or drag to resize
Coordinates System and Graphic Units

The PDF document uses the point (1/72 inch) as a graphic unit. All the coordinates and sizes are expected to be specified in points. Sometimes, when the size of an element (e.g. image) is known in pixels, it is useful to convert pixels in points. The HTML to PDF Converter API offers the UnitsConverter class to convert pixels in points and points in pixels. Here are the prototypes of these static functions from the UnitsConverter class:

public static float PointsToPixels(float points);
public static float PixelsToPoints(float pixels);

The coordinates system origin is located in the top left corner. The positive X coordinates go to right and the positive Y coordinates go down like in the .NET Windows Forms graphics.