The expense of publishing such defaulters shall be paid out of the county treasury on the allowance of the board of supervisors in the case of a county or county district officer, and in the case of a state or state district officer, out of the state treasury, as other contingent expenses are paid.