In the Islamic world, where paper dominated in the production of secular , this was usually done by employing a ruling frame (called, mistarah) made of wood with cords placed across it at regular intervals.
American Paper and Pulp Association.
1965. The Dictionary of Paper, including pulp, paperboard, paper properties and related papermaking terms. 3rd ed. New York.
In Islamic papers the chain lines are either irregularly spaced or, if regularly spaced, are arranged in groups of 2's (on the oldest papers until the beginning of the 13th century) or 3's (beginning in the 1200's and then dominating) or alternating groups of 2's and 3's (introduced around the 1380's in Syria and Palestine).
The paper is made thinner when it comes into contact with this design, and this causes the design to be visible when the paper is held up to the light.