Python SDK kita sing kuat ngidini sampeyan nemokake prabédan antarane DOC dokumen lan nyimpen asil menyang format sing trep kanggo dideleng. Kanggo verifikasi kemampuan produk, mbandhingake DOC file nggunakake perpustakaan Python iki lan deleng bedane.
Kita Python SDK dirancang kanggo menehi asil sing paling akurat, sanajan perbandingan minangka fungsi sing kompleks.
Kadhangkala sampeyan kudu mesthekake yen dokumen ing DOC format durung diganti, lan yen wis, sampeyan kudu ngerteni apa bedane. Cukup gunakake alat diff Python kanggo mbandhingake rong DOC file lan temokake bedane kabeh tembung utawa karakter tunggal. Kajaba iku, yen mung siji karakter ing tembung sing diganti, tembung iki bakal ditandhani minangka diganti kabeh.
Saiki sampeyan ora perlu maneh nglampahi wektu kanthi manual mbandhingake DOC dokumen, lan sampeyan bisa kanthi cepet nemokake owah-owahan cilik lan ngekspor bedane kasebut menyang dokumen kanthi format sing trep.
Priksa kepiye solusi kanggo mbandhingake DOC file nggunakake Python SDK. Kanggo entuk iki, muat DOC file sing pengin dibandhingake lan pilih format file ekspor - bakal dimuat kanthi otomatis sawise mbandhingake.
Elinga yen sampeyan kudu nampa kabeh revisi ing dokumen sing dibandhingake sadurunge nelpon metode perbandingan, kaya sing ditampilake ing conto kita:
import asposewordscloud
words_api =
WordsApi(client_id = '####-####-####-####-####', client_secret = '##################')
file_name1= 'Input1.doc'
file_name2= 'Input2.doc'
file_result= 'Output.doc'
# Unggah dokumen menyang panyimpenan maya.
first_document_content = open(file_name1, 'rb')
upload_first_file_request =
asposewordscloud.models.requests.UploadFileRequest(
file_content=first_document_content, path=file_name1)
words_api.upload_file(upload_first_file_request)
second_document_content = open(file_name2, 'rb')
upload_second_file_request =
asposewordscloud.models.requests.UploadFileRequest(
file_content=second_document_content, path=file_name2)
words_api.upload_file(upload_second_file_request)
# Bandhingake dokumen ing awan.
compare_data_options =
asposewordscloud.CompareData(
author='author',
file_reference=asposewordscloud.FileReference.fromRemoteFilePath(file_name2))
compare_document_request =
asposewordscloud.models.requests.CompareDocumentRequest(
name=file_name1, compare_data=compare_data_options, dest_file_name=file_result)
words_api.compare_document(compare_document_request)
# Download dokumen asil saka panyimpenan awan.
download_file_request = asposewordscloud.models.requests.DownloadFileRequest(path=file_result)
download_file_result = words_api.download_file(download_file_request)
open('compareResult.pdf','wb').write(download_file_result)
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 nindakake operasi mbandhingake kanggo format file liyane: