Section 5. In a criminal case in which questions of law are carried to the supreme judicial court, the attorney general or district attorney may have necessary copies of the brief for the commonwealth printed, and the expense thereof shall be paid in the same manner as other expenses in the case.