Skip to main content

pyhtmlconv: html converter (image / pdf)

Project description

pyhtmlconv: html converter (image / pdf)

python html converter (image / pdf)

Installation

Anda perlu menginstall wkhtmltopdf, sebelum menginstall modul ini.

pip install pyhtmlconv

Example

import pyhtmlconv as html
url = "https://google.com"
image = html.convert_to_image(url, "jpeg")
with open("test_image.jpeg", "wb") as fp:
    fp.write(image)

pdf = html.convert_to_pdf(url)
with open("test_file.pdf") as fp:
    fp.write(pdf)

Anda juga dapat mengkonversikan data (image atau pdf) ke bentuk data uri dengan cara menambahkan nilai True pada parameter datauri di fungsi convert_to_image atau convert_to_pdf.

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

pyhtmlconv-1.3.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

pyhtmlconv-1.3-py2.py3-none-any.whl (5.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file pyhtmlconv-1.3.tar.gz.

File metadata

  • Download URL: pyhtmlconv-1.3.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.6.9

File hashes

Hashes for pyhtmlconv-1.3.tar.gz
Algorithm Hash digest
SHA256 36081786b9fbbe9d53fbfbb88db2e5b811ea24ef6de7e43af2fc4365eaa3bb5a
MD5 d0d211462837665d792b29a44a473997
BLAKE2b-256 51ce7d07b2aa3edea8693c9801d8e28091a9d621d47d3ec1ea4afb537d036915

See more details on using hashes here.

File details

Details for the file pyhtmlconv-1.3-py2.py3-none-any.whl.

File metadata

  • Download URL: pyhtmlconv-1.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.6.9

File hashes

Hashes for pyhtmlconv-1.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 925fbc94854d4d9f07028267f10b2d56548adda6c56a1d78870d406d0e84ead2
MD5 6cf15cfa7d536d7224c8c12b71af7b6d
BLAKE2b-256 acb2e7c1ecf66550263328a1205e2897fe18e6afb2efc4b888b13f82f4ff301c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page