Gunakake C++ kanggo entuk maksimum HTML nganti EPUB kacepetan konversi. Iki minangka solusi piranti lunak profesional lengkap kanggo ngimpor lan ngekspor HTML, EPUB, lan akeh format dokumen liyane nggunakake C++.
Kanggo pangembang C++ sing nggoleki solusi sing lancar kanggo ngowahi HTML 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 HTML, EPUB utawa format file liyane, Aspose.Words for C++ nyakup kabeh lan njamin asil sing paling dhuwur. Tes carane C++ kode bisa digunakake karo file HTML sampeyan saiki.
Conto ing ngisor iki nduduhake carane ngowahi HTML dadi EPUB kanthi mung sawetara baris C++ kode. Mulai kanthi nyakup spasi jeneng Aspose.Words ing proyek C++. Sabanjure, nemtokake path menyang file input lan nggawe obyek Document kanggo mbukak isi HTML. 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.html");
doc->Save(u"Output.epub");
using namespace Aspose::Words;
auto doc = MakeObject<Document>(u"Input.html");
doc->Save(u"Output.epub");
using namespace Aspose::Words;
auto doc = MakeObject<Document>(u"Input.html");
for (int page = 0; page < doc->get_PageCount(); page++)
{
auto extractedPage = doc->ExtractPages(page, 1);
extractedPage->Save(String::Format(u"Output_{0}.epub", page + 1));
}
using namespace Aspose::Words;
auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);
builder->InsertImage(u"Input.html");
doc->Save(u"Output.epub");
using namespace Aspose::Words;
auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);
auto shape = builder->InsertImage(u"Input.html");
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 HTML menyang akeh format file liyane: