It means notary, scribe, secretary of the office. A person who acts as a clerk in a court or tribunal.
They were people who had extensive knowledge about types of letters and alphabets, people specializing in the art of writing in its various forms.
In the derogatory sense is said of the person who validates documents " legal " the malfeasance of others