What unit are the margins and other template elements measured in?

It’s not clear what units are being used when customizing invoices. For example, what units are used here when defining margins?:

It would be very helpful to use units that are preferred in the system or by our browser locale. For example, I am accustomed to working with inches for paper sizes and other design issues and elements since all of my measuring rulers, etc. are in such units generally…

Hmm, it appears that the system defaults to using “points” for sizing: pdfmake documentation: DOCUMENT-DEFINITION-OBJECT

All numbers are in points (pt) unit (sometimes labeled as PDF/PostScript points).

By using Google “40 points to inches” or a site like this:

I was able to determine that 40 points equals 0.555556 inch and 60 points are 0.833333 inch.

From this I will work backwards and put my inches measurements in and convert to points for insertion.

I would highly suggest that you, at the very least, please put this unit of measurement somehow into the settings pages so as to clarify this without having to hunt for the details. It would be nicer if we could select the units of measurement we want, but perhaps this is too challenging to do since pdfmake seems to default to points.

1 Like