How PDF Coordinate Systems Works with UniPDF

PDF coordinates are expressed in terms of the "user space" called cartesian coordinate system. User space is a coordinate system that is device-independent, has the same relationship to the current PDF page, and doesn’t have any connection with the output device. PDF documents exhibit the following properties.

  • It is a flat 2-dimensional space just like a piece of paper.
  • The units of user space are called “points” that are 72 points/inch.

The origin is located in the bottom left corner of the page. The horizontal coordinate extends to the right, and the vertical coordinate extends to the top.
PDF documents don’t have a resolution. A typical pdf documents have a page width and height of 612 and 792 respectively.

Coordinate Pointing in UniPDF

The X and Y values will begin at 0, with the maximum of X depending on page width and the maximum of Y depending on page height.
By default, the PDF has 72 points per inch, but this can vary depending on how the user sets the resolutions.
If you have a page width of 1 inch, the maximum of X is 72, and if you have a page height of 2 inches, the maximum of Y will be 144.

The coordinate is for drawing the rectangle shapes.

	 `[]float64{123.97, 619.02, 343.99, 633.6}}`

It means start of X is: 123.97, start of Y is: 619.02, end of X is: 343.99, and end of Y is: 633.6.


For further details, please apidocs.unidoc.io or send an email at UniDoc Support.