Upon the filing of an affidavit in accordance with subsections (a) and (b) and the prepayment of any partial filing fee as may be required under subsection (b), the court may direct payment by the United States of the expenses of (1) printing the record on appeal in any civil or criminal case, if such printing is required by the appellate court; (2) preparing a transcript of proceedings before a United States magistrate judge in any civil or criminal case, if such transcript is required by the district court, in the case of proceedings conducted under
section 636(b) of this title or under
section 3401(b) of title 18, United States Code; and (3) printing the record on appeal if such printing is required by the appellate court, in the case of proceedings conducted pursuant to
section 636(c) of this title. Such expenses shall be paid when authorized by the Director of the Administrative Office of the United States Courts.