Wordize for .NET convertit HTML en format SVG en préservant la structure, la mise en forme et le contenu. La classe Converter garantit une transformation précise pour une migration de documents sans difficulté.
Testez la conversion HTML en SVG en utilisant notre démo interactive en ligne. Téléchargez votre fichier HTML, lancez la conversion et téléchargez le document SVG. Le code C# fourni est prêt pour l'intégration dans votre projet .NET.
using Wordize.Conversion;
using Wordize.Saving;
var imageStreams = Converter.ConvertToImages("Input.html", new ImageSaveOptions(SaveFormat.Svg));
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}.svg");
stream.CopyTo(file);
}
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();
Ajoutez Wordize SDK à votre projet .NET
Appelez la méthode Converter.Convert() en spécifiant les noms des fichiers d'entrée et de sortie comme paramètres. Les formats sont détectés automatiquement en fonction des extensions de fichiers
Obtenez le fichier SVG