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

Function create_page

gen_pdf.py:15–27  ·  view source on GitHub ↗
(width, height)

Source from the content-addressed store, hash-verified

13 return action
14
15def create_page(width, height):
16 page = PdfDict()
17 page.Type = PdfName.Page
18 page.MediaBox = PdfArray([0, 0, width, height])
19
20 page.Resources = PdfDict()
21 page.Resources.Font = PdfDict()
22 page.Resources.Font.F1 = PdfDict()
23 page.Resources.Font.F1.Type = PdfName.Font
24 page.Resources.Font.F1.Subtype = PdfName.Type1
25 page.Resources.Font.F1.BaseFont = PdfName.Courier
26
27 return page
28
29def create_field(name, x, y, width, height, value="", f_type=PdfName.Tx):
30 annotation = PdfDict()

Callers 1

gen_pdf.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected