PyMuPDF 1.24.2 DocumentationMEDIABOX + (36, 50, -36, -36) # sub rectangle for source content # location of the header rectangle HDR_WHERE = (36, 5, MEDIABOX.width - 36, 40) # location of the footer rectangle FTR_WHERE = (36, MEDIABOX line return def header_story(text): """Make the page header""" header = fitz.Story() hdr_body = header.body hdr_body.add_paragraph().set_properties( align=fitz.fitz.TEXT_ALIGN_CENTER, bgcolor="#eee" fileinput.read().decode() fileinput.close() # make level 2 header hdr = body.add_header(2) if i > 1: hdr.set_pagebreak_before() hdr.add_text(f"{i}. Listing of file '{code_file}'") # Write the file code0 码力 | 565 页 | 6.84 MB | 1 年前3
共 1 条
- 1
相关搜索词













