Gunakake API konversi dokumen kanggo ngembangake piranti lunak independen platform tingkat dhuwur ing Python. Iki minangka solusi piranti lunak profesional lengkap kanggo ngimpor lan ngekspor Word, TIFF, lan akeh format dokumen liyane nggunakake Python.
Apa sampeyan kudu ngowahi Word dadi sakumpulan TIFF gambar kanthi program? Kanthi Aspose.Words kanggo Python via .NET sampeyan bisa ngowahi Word menyang TIFF format kanthi mung sawetara baris Python kode.
Python via .NET kita nggawe TIFF gambar saka Word kanthi kualitas profesional. Tes kualitas Word menyang konversi gambar sing paling dhuwur ing browser sampeyan. API konversi Python via .NET kuat Word menyang akeh format populer.
Conto ing ngisor iki nuduhake carane ngowahi Word dadi sakumpulan TIFF gambar ing Python.
Tindakake langkah-langkah gampang kanggo ngowahi Word dadi TIFF format. Waca Word saka drive lokal, banjur simpen ing TIFF format gambar, nemtokake format file sing dibutuhake kanthi ekstensi TIFF Kanggo Word lan nulis TIFF, sampeyan bisa nggunakake jeneng file sing mumpuni. Konten lan TIFF format output bakal padha karo Word dokumen.
pip install aspose-words
Nyalin
import aspose.words as aw
doc = aw.Document(Input.docx)
for page in range(0, doc.page_count):
extractedPage = doc.extract_pages(page, 1)
extractedPage.save(f"Output_{page + 1}.tiff")
import aspose.words as aw
doc = aw.Document("Input.docx")
doc.save("Output.tiff")
import aspose.words as aw
doc = aw.Document(Input.docx)
for page in range(0, doc.page_count):
extractedPage = doc.extract_pages(page, 1)
extractedPage.save(f"Output_{page + 1}.tiff")
import aspose.words as aw
doc = aw.Document()
builder = aw.DocumentBuilder(doc)
builder.insert_image("Input.docx")
doc.save("Output.tiff")
import aspose.words as aw
doc = aw.Document()
builder = aw.DocumentBuilder(doc)
shape = builder.insert_image("Input.docx")
shape.get_shape_renderer().save("Output.tiff", aw.saving.ImageSaveOptions(aw.SaveFormat.tiff))
Kita dadi tuan rumah paket Python ing repositori PyPi. Mangga tindakake langkah-langkah dening-instruksi carane nginstal "Aspose.Words for Python via .NET" kanggo lingkungan pangembang.
Paket iki kompatibel karo Python ≥3.5 lan <3.12. Yen sampeyan ngembangake piranti lunak kanggo Linux, deleng syarat tambahan kanggo gcc lan libpython ing Dokumentasi Produk.
Sampeyan bisa ngowahi Word menyang akeh format file liyane: