Classe HtmlConverter
Information
Représente le plugin Documentize.HtmlConverter. Utilisé pour convertir des documents PDF en format HTML et des documents HTML en format PDF.
public sealed class HtmlConverter : IDisposable
Héritage
Implémente
Membres hérités
- object.GetType(),
- object.ToString(),
- object.Equals(object?),
- object.Equals(object?, object?),
- object.ReferenceEquals(object?, object?),
- object.GetHashCode()
Exemples
L’exemple démontre comment convertir un PDF en document HTML.
// créer HtmlConverter
var plugin = new HtmlConverter();
// créer un objet PdfToHtmlOptions pour définir le type de données de sortie comme fichier avec ressources intégrées
var opt = new PdfToHtmlOptions(PdfToHtmlOptions.SaveDataType.FileWithEmbeddedResources);
// ajouter le chemin du fichier d'entrée
opt.AddInput(new FileDataSource(inputPath));
// définir le chemin du fichier de sortie
opt.AddOutput(new FileDataSource(outputPath));
plugin.Process(opt);
L’exemple démontre comment convertir un document HTML en PDF.
// créer HtmlConverter
var plugin = new HtmlConverter();
// créer HtmlToPdfOptions
var opt = new HtmlToPdfOptions();
// ajouter le chemin du fichier d'entrée
opt.AddInput(new FileDataSource(inputPath));
// définir le chemin du fichier de sortie
opt.AddOutput(new FileDataSource(outputPath));
plugin.Process(opt);
Constructeurs
HtmlConverter()
public HtmlConverter()
Méthodes
Dispose()
Implémentation de IDisposable.
public void Dispose()
Process(IPluginOptions)
Démarre le traitement de Documentize.HtmlConverter avec les paramètres spécifiés.
public ResultContainer Process(IPluginOptions options)
Paramètres
options
IPluginOptions: Un objet d’options contenant des instructions pour Documentize.HtmlConverter.
Retourne
ResultContainer : Un objet Documentize.ResultContainer contenant le résultat de l’opération.
Namespace : Documentize Assembly : Documentize.dll