Wordize for .NET umożliwia konwersję dokumentów HTML na e-booki EPUB z zachowaniem oryginalnej struktury, formatowania i stylów. Klasa Converter zapewnia dokładną transformację do bezproblemowego tworzenia e-booków.
Przetestuj tworzenie e-booków EPUB z dokumentów HTML w C# za pomocą interaktywnego demo online. Prześlij plik HTML, uruchom konwersję i pobierz gotowy e-book. Przedstawiony kod C# jest gotowy do integracji z projektem .NET.
using Wordize.Conversion;
Converter.Convert("Input.html", "Output.epub");
using Wordize.Conversion;
Converter.Convert("{{input1}}", "{{output}}");
using Wordize.Conversion;
using Wordize.Saving;
var imageStreams = Converter.ConvertToImages("{{input1}}", new ImageSaveOptions(SaveFormat.{{saveFormat}}));
foreach (var (stream, page) in imageStreams.Select((s, i) => (s, i)))
{
using var _ = stream;
stream.Position = 0;
using var file = File.Create($"Output_{page + 1}.{{outputExt}}");
stream.CopyTo(file);
}
using Wordize.Conversion;
using Wordize.Saving;
ImageSaveOptions saveOptions = new ImageSaveOptions(SaveFormat.{{saveFormat}});
saveOptions.PageLayout = MultiPageLayout.Vertical(10);
Converter.Create()
.From("{{input1}}")
.To("{{output}}", saveOptions)
.Execute();