Gunakake C++ kanggo entuk maksimum DOC nganti EPUB kacepetan konversi. Iki minangka solusi piranti lunak profesional lengkap kanggo ngimpor lan ngekspor DOC, EPUB, lan akeh format dokumen liyane nggunakake C++.
Kanggo pangembang C++ sing nggoleki solusi sing lancar kanggo ngowahi DOC dadi EPUB, Aspose.Words for C++ nyedhiyakake API konversi file sing intuisi lan langsung. Solusi kita ngidini pangembang C++ gampang ngowahi file saka format siji menyang format liyane, dadi alat sing penting kanggo ngotomatisasi tugas konversi file.
Apa sampeyan nggarap DOC, EPUB utawa format file liyane, Aspose.Words for C++ nyakup kabeh lan njamin asil sing paling dhuwur. Tes carane kode C++ bisa digunakake karo file DOC sampeyan saiki.
Conto ing ngisor iki nduduhake carane ngowahi DOC dadi EPUB kanthi mung sawetara baris kode C++. Mulai kanthi nyakup spasi jeneng Aspose.Words ing proyek C++. Sabanjure, nemtokake path menyang file input lan nggawe obyek Document kanggo mbukak isi DOC. Sampeyan banjur kudu nemtokake path menyang file output EPUB lan nggunakake metode Save() kanggo nyimpen asil minangka EPUB. API konversi bakal nemtokake format file output adhedhasar ekstensi file sing ditemtokake.
dotnet add package Aspose.Words.Cpp
Nyalin
using namespace Aspose::Words;
auto doc = MakeObject<Document>(u"Input.doc");
doc->Save(u"Output.epub");
using namespace Aspose::Words;
auto doc = MakeObject<Document>(u"Input.doc");
doc->Save(u"Output.epub");
using namespace Aspose::Words;
auto doc = MakeObject<Document>(u"Input.doc");
auto saveOptions = MakeObject<ImageSaveOptions>(SaveFormat::Png);
for (int page = 0; page < doc->get_PageCount(); page++)
{
saveOptions->set_PageSet(MakeObject<PageSet>(page));
doc->Save(String::Format(u"Output_{0}.epub", page + 1), saveOptions);
}
using namespace Aspose::Words;
auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);
builder->InsertImage(u"Input.doc");
doc->Save(u"Output.epub");
using namespace Aspose::Words;
auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);
auto shape = builder->InsertImage(u"Input.doc");
shape->GetShapeRenderer()->Save(u"Output.epub", MakeObject<ImageSaveOptions>(SaveFormat::Svg));
Ana telung opsi kanggo nginstal Aspose.Words for C++ kanggo lingkungan pangembang. Pilih salah siji sing cocog karo kabutuhan sampeyan lan tindakake pandhuan langkah demi langkah:
Sampeyan bisa nggunakake perpustakaan C++ iki kanggo nggawe piranti lunak ing Microsoft Windows, Linux lan macOS:
Yen sampeyan nggawe piranti lunak kanggo Linux utawa macOS, priksa informasi babagan katergantungan perpustakaan tambahan (fontconfig lan paket sumber terbuka mesa-glu) ing Dokumentasi Produk.
Sampeyan bisa ngowahi DOC menyang akeh format file liyane: