Vi accepterar för närvarande inte EPUB filer som indata. Men vi kan producera EPUB filer som en utgång. Vi ser fram emot fullt EPUB stöd inom en snar framtid.
Med hjälp av vårt kraftfulla C++ API kan utvecklare komprimera EPUB dokument för att optimera innehåll och utdatafilstorlek. Att minska EPUB storleken sker genom att rensa oanvända data och resurser. Du kan också komprimera bilder inuti EPUB för att göra utdatafilens storlek ännu mindre.
Resultatet av innehållsoptimering och komprimering kan sparas i den ursprungliga EPUB eller valfritt tillgängligt sparat format – DOCX, DOC, RTF, HTML och många andra. Till exempel, komprimera EPUB och spara utdata som Word.
Som nämnts låter vår C++ SDK dig att programmatiskt minska EPUB storleken. Och nu kan du prova vår kraftfulla funktionalitet och utvärdera hur du komprimerar EPUB i C++ med följande exempel:
using namespace aspose::words::cloud;
auto config = std::make_shared<ApiConfiguration>(L"####-####-####-####-####",
L"##################");
auto wordsApi = std::make_shared<WordsApi>(config);
auto requestDocument = std::shared_ptr<std::istream>(
new std::ifstream(std::filesystem::path(L"Input.docx"), std::istream::binary));
auto requestCompressOptions = std::make_shared<aspose::words::cloud::models::CompressOptions>();
requestCompressOptions->setImagesQuality(std::make_shared<int32_t>(75));
requestCompressOptions->setImagesReduceSizeFactor(std::make_shared<int32_t>(1));
std::shared_ptr<requests::CompressDocumentOnlineRequest> compressDocumentRequest(
new requests::CompressDocumentOnlineRequest(
requestDocument, requestCompressOptions
)
);
auto compressDocument = wordsApi->compressDocumentOnline(compressDocumentRequest);
auto requestDocument = std::shared_ptr<std::istream>(
compressDocument->document->values.begin, std::istream::binary));
std::shared_ptr<requests::ConvertDocumentRequest> convertDocument(
new requests::ConvertDocumentRequest(
requestDocument, std::make_shared<std::wstring>(L"epub")
)
);
wordsApi->convertDocument(convertDocument);
Clone Aspose.Words Cloud SDK for C++ källkod från GitHub. Du kan hitta detaljerad information om att bygga och konfigurera SDK:n i avsnittet "How to use the SDK".
För att snabbt få nödvändiga säkerhetsuppgifter och få tillgång till vårt REST API, följ dessa Instructions i dokumentationen.
Se Repository Documentation för att se detaljerna.
Du kan utföra dokumentkomprimering för andra filformat: