Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Docs: What is the conversion from points to pixels?

In the Google Apps Script documentation, it vaguely refers to points multiple times, for instance here, to refer to dimensions of the page. A quick Google search turned up that this conversion depends on many factors, including font size. So what does this number really mean, and can I convert it to pixels in the code?

Here is a sample from the link above:

getPageHeight()

Retrieves the page height, in points.

Returns:

Number — the page height, in points

getPageWidth()

Retrieves the page width, in points.

Returns:

Number — the page width, in points

like image 480
John Targaryen Avatar asked Sep 01 '25 16:09

John Targaryen


1 Answers

Points are traditionally used in print media (anything that is to be printed on paper, etc.). One point is equal to 1/72 of an inch. Points are much like pixels, in that they are fixed-size units and cannot scale in size.

like image 170
Rivero Avatar answered Sep 04 '25 20:09

Rivero