fix: uploading barcode pdf files instead of images

This commit is contained in:
2024-11-06 15:35:28 +04:00
parent 4f9d55d2c6
commit fced9b8101
4 changed files with 36 additions and 22 deletions

View File

@@ -189,8 +189,3 @@ class PDFGenerator:
pdf_maker.add_pdfs(file)
return pdf_maker.get_bytes()
def generate_barcode_image(self, barcode_image_url: str, path_to_save_pdf: str):
c = canvas.Canvas(path_to_save_pdf, pagesize=(self.page_width, self.page_height))
c.drawImage(barcode_image_url, 0, 0, width=self.page_width, height=self.page_height)
c.save()