Ver código fonte

fix bug import

Alex Sidorov 1 ano atrás
pai
commit
bd147feac5
1 arquivos alterados com 3 adições e 3 exclusões
  1. 3 3
      window/DialogHistory.py

+ 3 - 3
window/DialogHistory.py

@@ -10,7 +10,7 @@ from sqlalchemy import func, select
 from logger import logger
 from module import create_filename
 from module.ModelPropusk import PropuskDataMethods
-from module.Printer import CreatorPDF
+from module.wkhtmltopdf import create_pdf
 from module.QRCode import make
 from module.TemplatePropusk import TemplatePropusk
 from module.WorkWithDB import connect, list_personal, list_place, list_propusk
@@ -102,8 +102,8 @@ class DialogHistory(Ui_DialogHistory, QDialog):
             # print(render_text)
             
             # Print(render_text)
-            pdf = CreatorPDF(render_text)
-            image  = convert_from_path(pdf.get_path_to_pdf())[0]
+            pdf = create_pdf(render_text)
+            image  = convert_from_path(pdf)[0]
             image_path = create_filename()
             QPixmap.fromImage(image.toqimage()).save(image_path, 'jpg')