107dc260 by 周伟奇

add f3 folder

1 parent a825541a
......@@ -24,6 +24,23 @@ WH_COUPLE_4 = (100, 300)
WH_COUPLE_5 = (100, 200)
class PDFBuild:
def __init__(self, path):
self.path = path
def insert_img(self, img_path_list):
if os.path.exists(self.path):
pdf = fitz.Document(self.path)
else:
pdf = fitz.Document()
for img_path in img_path_list:
new_page = pdf.newPage()
new_page.insertImage(new_page.rect, img_path)
pdf.save(self.path)
pdf.close()
class PDFHandler:
def __init__(self, path, img_dir_path, document_name=None):
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!