PDF documents allow line, polyline and polygon annotations to contain measurement information to measure the distance, perimeter and area of parts of a document. A scale is defined so that, for example, one inch on the document is defined as one foot, allowing you determine the actual size of things in an architectural diagram once you know the scale.
PDF.js Express Web Viewer has built-in tools allowing you to create these annotations and provides a UI to modify common properties. There is also a more advanced programmatic API for fine grained control.
Setup PDF.js Express Web Viewer for measurement
To setup PDF.js Express Web Viewer to display and enable measurements.
To set measurement properties for scale and precision using the UI or programmatically.
To create measurement annotations using the UI.