Skip to main content

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.

Release files for pyhtmlconv 1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyhtmlconv 1.3
File Size Uploaded
pyhtmlconv-1.3.tar.gz 3.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyhtmlconv 1.3
File Interpreter ABI Platform
pyhtmlconv-1.3-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size:8.7 kB

Release files / pyhtmlconv-1.3.tar.gz

Download URL pyhtmlconv-1.3.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
36081786b9fbbe9d53fbfbb88db2e5b811ea24ef6de7e43af2fc4365eaa3bb5a
BLAKE2b-256 checksum
How to use checksums
51ce7d07b2aa3edea8693c9801d8e28091a9d621d47d3ec1ea4afb537d036915
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / pyhtmlconv-1.3-py2.py3-none-any.whl

Download URL pyhtmlconv-1.3-py2.py3-none-any.whl
Size 5.4 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
925fbc94854d4d9f07028267f10b2d56548adda6c56a1d78870d406d0e84ead2
BLAKE2b-256 checksum
How to use checksums
acb2e7c1ecf66550263328a1205e2897fe18e6afb2efc4b888b13f82f4ff301c
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

1.3 This release

2 release files

1.2

2 release files

1.1

2 release files

1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page