By default the ruler origin is placed to the bottom-left corner of the drawing (paper). You can place the origin anywhere in the drawing by using this function. Simply select this function in the ruler context menu and then click on a desired point in the drawing to define new position of the ruler origin. Using of the Ctrl modifier changes only X (horizontal) component of the origin, using of the Shift modifier changes only Y (vertical) component of the origin. Use right mouse click anywhere to delete the custom ruler origin and set it back to the default position. This deletion can be also made with the Ctrl or Shift modifiers to default the X or Y component only.
Please note that you can change ruler origin only for the length units.