MCPcopy Create free account
hub / github.com/ading2210/linuxpdf / create_keys_row

Function create_keys_row

gen_pdf.py:85–97  ·  view source on GitHub ↗
(keys, x, y, width, height, gap)

Source from the content-addressed store, hash-verified

83 return buttons
84
85def create_keys_row(keys, x, y, width, height, gap):
86 buttons = []
87 for i, key in enumerate(keys):
88 name = "button_" + key
89 new_x = x + i * (width + gap)
90 button = create_button(name, new_x, y, width, height, key.upper())
91 button.AA = PdfDict()
92 if key == "'":
93 key = "\\'"
94 button.AA.D = create_script(f"button_down('{key}')")
95 button.AA.U = create_script(f"button_up('{key}')")
96 buttons.append(button)
97 return buttons
98
99if __name__ == "__main__":
100 with open(sys.argv[1]) as f:

Callers 1

gen_pdf.pyFile · 0.85

Calls 2

create_buttonFunction · 0.85
create_scriptFunction · 0.85

Tested by

no test coverage detected