Related subjects →  Tutorial , Boxes , Page , Dimensions .

Coordinates system in PDF format and PostScript.

In PDF format, pages are considered a two-dimensional space defined by two coordinates (X, horizontal axis, and Y, vertical axis). It starts at the bottom left corner (XY point "0,0") and its dimensions progress upwards and to the right. This way of describing space is an inheritance from PostScript language.

Thus, if we move something by increasing the magnitude of its coordinates, what we are doing is moving it up and to the right.

Coordinates system in PDF format and PostScript.

Following this logic, when we define a quadrangular object with two pairs of coordinates, the first pair corresponds to the lower left corner and the second to the upper right corner (as shown in the drawing above). Of both coordinates, the first value is always the horizontal (X).

This coordinate system is the "User Space". The units into which this space is divided are called "points" and there are 72 points per inch (1 inch is 2.54 cm). From PDF level 1.6 onwards, customized measurements ("User Units") can be used.

The outer boundary of the page is the "MediaBox" and its lower left corner should be the coordinate point "0,0".