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.2.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyhtmlconv-1.2-py2.py3-none-any.whl (4.4 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: pyhtmlconv-1.2.tar.gz
  • Upload date:
  • Size: 2.8 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.2.tar.gz
Algorithm Hash digest
SHA256 18cbe32d26285d2d0d790fe7a3aeb1c1550ae83ed917e7ba5ceedbc2d7fc7b35
MD5 0507b3574bd026b215afd4fad22bf3ca
BLAKE2b-256 34db638eeb13c5a5738e3d76d707ed89277ff41c39c2e5a735e62f5975bf294f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyhtmlconv-1.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 4.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.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2aed1c7598e9d705e09eba41762a32191863c1f743ef86aa0afb0063904bd8af
MD5 74e173af11276d20b06fa7938ca290fe
BLAKE2b-256 ce9ec78ddcac44925a779fb95bfd12241082e6e95abe572dbbf9cfca53c08aea

See more details on using hashes here.

Supported by

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