Gunakake perpustakaan Python kanggo nggabungake Word menyang JPG liwat REST API. Gabungke loro utawa luwih Word berkas dadi siji berkas JPG nganggo Python.
Gabung Word format menyang JPG kanthi gampang ing Python kode. Pustaka Python iki dirancang kanggo nggabungake pirang-pirang Word file dadi JPG file siji nggunakake REST API, yaiku kanthi ngirim telpon HTTPS liwat Internet.
Iki minangka solusi gabungan Word to JPG profesional Cloud-native sing nyedhiyakake programer Python kanthi keluwesan pangembangan lan fitur sing kuat. Gabung karo Word file asring digunakake nalika perlu kanggo nggawe set JPG dokumen saka struktur sing padha, sing saben ngemot data unik. Kanthi nggabungake file, sampeyan bisa ngotomatisasi alur kerja Word/JPG digital lan mbukak sawetara bagean rutin proses kasebut menyang piranti lunak Python ngolah dokumen kanthi cepet lan efisien.
Sampeyan bisa uga kudu nggabungake Word file dadi siji JPG file ing akeh kasus. Contone, sampeyan bisa uga pengin nggabungake macem-macem Word file bebarengan sadurunge nyetak utawa arsip.
Penggabungan Word bisa dadi bagean saka pendekatan pangolahan dokumen terpadu kanggo ngasilake JPG dokumen saka sumber data sing beda-beda. tugas kuwi ndherek nggunakake Word lengkap / JPG manipulasi Python perpustakaan sing bakal proses pesawat saka Word file lan gabungke bebarengan ing wektu paling cendhak, mrodhuksi asil JPG kompak lan akurat.
Kanggo nindakake gabungan Word kanggo JPG ing Python, sampeyan butuh paling ora rong Word 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.docx', 'rb')
merge_props = asposewordscloud.DocumentEntry(
file_reference=asposewordscloud.FileReference.fromRemoteFilePath('Input2.docx'),
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: