Skip to content

This is a simple wrapper of the QWebengineview(PyQt5) class. It's base on the client/sever model. You can create multiple process to render html and print to pdf easily.

License

Notifications You must be signed in to change notification settings

czwchenzhun/webpage2pdf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a simple wrapper of the QWebEngineView(PyQt5) class.
It's base on the client/server model.

Requirements

  • python3
  • PyQt5

Errors will occur if the version of PyQt5 is too high.Cause PyQt5.QtWebEngineWidgets not exist.

	pip install PyQt5==5.10.1

Usage

	#! -*- coding:utf-8 -*-
	from webpage2pdf import RenderManager		
	#must start from __main__
	if __name__=='__main__':
		rm=RenderManager()
		rm.addRender(num=2,showUI=True)
		rm.from_url('http://www.baidu.com/','0.pdf')
		rm.from_html("Hello World!",'1.pdf')
		#rm.from_localFile('html/test.html','2.pdf')
		print('start.')
		rm.waitFinish()
		print('finish all.')		
	

About

This is a simple wrapper of the QWebengineview(PyQt5) class. It's base on the client/sever model. You can create multiple process to render html and print to pdf easily.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages