Gunakake perpustakaan Python kanggo nggabungake Word menyang PDF liwat REST API. Gabungke loro utawa luwih Word berkas dadi siji berkas PDF nganggo Python.
Gabung Word format menyang PDF kanthi gampang ing Python kode. Pustaka Python iki dirancang kanggo nggabungake pirang-pirang Word file dadi PDF file siji nggunakake REST API, yaiku kanthi ngirim telpon HTTPS liwat Internet.
Iki minangka solusi gabungan Word to PDF 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 PDF dokumen saka struktur sing padha, sing saben ngemot data unik. Kanthi nggabungake file, sampeyan bisa ngotomatisasi alur kerja Word/PDF 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 PDF 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 PDF dokumen saka sumber data sing beda-beda. tugas kuwi ndherek nggunakake Word lengkap / PDF manipulasi Python perpustakaan sing bakal proses pesawat saka Word file lan gabungke bebarengan ing wektu paling cendhak, mrodhuksi asil PDF kompak lan akurat.
Kanggo nindakake gabungan Word kanggo PDF 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')
# Muat dokumen kanggo ditambahake saka panyimpenan Cloud.
merge_document = asposewordscloud.DocumentEntry(
file_reference=asposewordscloud.FileReference.fromRemoteFilePath('Input2.docx'),
import_format_mode='KeepSourceFormatting')
document_entries = [merge_document]
document_list = asposewordscloud.DocumentEntryList(document_entries=document_entries)
append_document_online = asposewordscloud.models.requests.AppendDocumentOnlineRequest(
document=document, document_list=document_list)
words_api.append_document_online(append_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: