当前位置:网站首页>Pdf merge based on pyqt5

Pdf merge based on pyqt5

2022-06-09 03:56:00 Crazy Beanbag

PyQt yes Qt Framework of the Python Language implementation , Is the most powerful GUI One of the Libraries .PyQt Provides a well-designed collection of window controls , It has more convenient operability . Did you learn VB My classmates will know , Compared with the VB Use , There are more elements in the interface design .

This article is based on PyQt5 Accomplished PDF Merge function , Look at the interface first :

  One 、 Interface PdfH.ui Refer to how to implement , The program code is as follows :

from PyQt5 import QtCore, QtGui, QtWidgets
import  base64
import os
from return_png import img as retu  #  introduce img Variable , Alias as pdf_cf


class Ui_PdfH(object):
    def setupUi(self, PdfH):
        tmp = open('return.png', 'wb')  #  Create temporary files 
        tmp.write(base64.b64decode(retu))  #  Put this one Decode the picture , Write to file .
        tmp.close()
        PdfH.setObjectName("PdfH")
        PdfH.resize(1400, 814)
        PdfH.setMinimumSize(QtCore.QSize(1400, 814))
        PdfH.setMaximumSize(QtCore.QSize(1400, 814))
        palette = QtGui.QPalette()
        brus
原网站

版权声明
本文为[Crazy Beanbag]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/160/202206090351276982.html