A Light Django Application which uses selenium to convert any html page to pdf. Using this approach you can easily make pdf of HTML pages with charts, tables and having their loaded Styles.
Project description
django-selenium-pdfmaker
A Light Django Application which uses selenium to convert any html page to pdf. Using this approach you can easily make pdf of HTML pages with charts, tables and having their loaded Styles.
Install
simply just using pip:
pip install django_selenium_pdfmaker
Usage
To use this module:
from django_selenium_pdfmaker.modules import PDFMaker
pdfmaker = PDFMaker()
res = pdfmaker.get_pdf_from_html(path='https://google.com', filename='output', write=True)
and res
includes:
{
"status": true,
"raw": "pdf in binary format",
"pdf": "ConvertedPDF instance if write flag is True.",
"message": ""
}
status
istrue
when converting to pdf is successful, else will befalse
. For example when url path is unreachablestatus
will befalse
.raw
is binary data of pdf before storing in file. Will hold data ifstatus == true
pdf
isConvertedPDF
object ifstatus
istrue
.message
will hold reason whystatus
isfalse
.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for django-selenium-pdfmaker-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0694d8df02304d926f916b9dcad6dbd7a973d114ecee00cc0cc6b34a3ad370e1 |
|
MD5 | c8053a8fb0c3e59afddb885f21072e7e |
|
BLAKE2b-256 | 16cc96a22c64a4dd065da24c469123561808aae50d6754bed1b0fb3713347a5f |
Close
Hashes for django_selenium_pdfmaker-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 461c885b4760666a3e66da98fe33829328ed5760d2c5bbf39aee716f1d15576c |
|
MD5 | 52e5c8b644cca9eb878d6607f74a4a70 |
|
BLAKE2b-256 | 571553b385f8391e4b5e3f4bacebb9b3573d06c4b4ffff34da3c10cd75b4d0e7 |