Gunakake perpustakaan Python kanggo nggabungake HTML menyang gambar liwat REST API. Gabungke loro utawa luwih HTML berkas dadi siji berkas gambar nganggo Python.
Gabung HTML file kanthi gampang lan ekspor asil menyang format grafis ing Python kode. Pustaka Python iki dirancang kanggo nggabungake pirang-pirang HTML file dadi siji gambar kanthi nggunakake REST API, yaiku kanthi ngirim telpon HTTPS liwat Internet.
Iki minangka solusi gabungan HTML to Image profesional, Cloud-native sing nyedhiyakake programer Python kanthi keluwesan pangembangan lan fitur sing kuat. Kanthi nggabungake file, sampeyan bisa ngotomatisasi alur kerja HTML/Gambar digital lan mbukak sawetara bagean rutin proses kasebut menyang piranti lunak Python pangolahan HTML sing cepet lan efisien.
Sampeyan bisa uga kudu nggabungake HTML file dadi siji gambar ing pirang-pirang kasus. Contone, sampeyan bisa uga pengin nggabungake macem-macem HTML file bebarengan sadurunge nyetak utawa arsip.
Penggabungan HTML bisa dadi bagean saka pendekatan pangolahan dokumen terpadu kanggo ngasilake gambar saka sumber data sing beda. tugas kuwi ndherek nggunakake HTML lengkap / Gambar manipulasi Python perpustakaan sing bakal proses pesawat saka HTML file lan gabungke bebarengan ing wektu paling cendhak, mrodhuksi output grafis kompak lan akurat.
Kanggo nindakake gabungan HTML kanggo-Gambar ing Python, sampeyan butuh paling ora rong HTML file sumber. Kanggo miwiti kanthi cepet, priksa conto Python kode ing ngisor iki.
import asposewordscloud
words_api = WordsApi(client_id = '####-####-####-####-####', client_secret = '##################')
document = open('Input1.html', 'rb')
merge_props = asposewordscloud.DocumentEntry(
file_reference=asposewordscloud.FileReference.fromRemoteFilePath('Input2.html'),
import_format_mode='KeepSourceFormatting')
document_entries = [merge_props]
document_list = asposewordscloud.DocumentEntryList(document_entries=document_entries)
append_document_online = asposewordscloud.models.requests.AppendDocumentOnlineRequest(
document=document, document_list=document_list)
merged_docs = words_api.append_document_online(append_document_online)
split_document_online = asposewordscloud.models.requests.SplitDocumentOnlineRequest(
document=merged_docs, format='jpg', zip_output=True)
words_api.split_document_online(split_document_online)
Instal Aspose.Words Cloud SDK for Python nggunakake repositori PyPi. pip install aspose-words-cloud kanggo nginstal SDK, banjur impor paket kasebut liwat import asposewordscloud. Minangka alternatif, sampeyan bisa kanthi manual clone Aspose.Words Cloud SDK for Python saka GitHub lan nggunakake ing project. Tututi Instructions iki supaya cepet entuk kredensial keamanan sing dibutuhake lan ngakses REST API kita.
Deleng Repository Documentation kanggo ndeleng rincian.
Sampeyan bisa nggunakake format populer liyane: