Class HtmlConverter
Info
Mewakili plugin Documentize.HtmlConverter. Digunakan untuk mengonversi dokumen PDF ke format HTML dan dokumen HTML ke format PDF.
public static class HtmlConverter
Inheritance
Inherited Members
- object.GetType(),
- object.MemberwiseClone(),
- object.ToString(),
- object.Equals(object?),
- object.Equals(object?, object?),
- object.ReferenceEquals(object?, object?),
- object.GetHashCode()
Examples
Contoh menunjukkan cara mengonversi PDF ke dokumen HTML.
// Buat objek PdfToHtmlOptions untuk mengatur jenis data keluaran sebagai file dengan sumber daya tersemat
var options = new PdfToHtmlOptions(PdfToHtmlOptions.SaveDataType.FileWithEmbeddedResources);
// Tambahkan jalur file input
options.AddInput(new FileDataSource("path_to_input.pdf"));
// Atur jalur file keluaran
options.AddOutput(new FileDataSource("path_to_output.html"));
// Lakukan proses
HtmlConverter.Process(options);
Contoh menunjukkan cara mengonversi HTML ke dokumen PDF.
// Buat HtmlToPdfOptions
var options = new HtmlToPdfOptions();
// Tambahkan jalur file input
options.AddInput(new FileDataSource("path_to_input.html"));
// Atur jalur file keluaran
options.AddOutput(new FileDataSource("path_to_output.pdf"));
// Lakukan proses
HtmlConverter.Process(options);
Methods
Process(PdfToHtmlOptions)
Mengonversi dokumen PDF ke format HTML.
public static ResultContainer Process(PdfToHtmlOptions options)
Parameters
options
PdfToHtmlOptions: Objek opsi yang berisi instruksi untuk operasi.
Returns
ResultContainer : Objek yang berisi hasil dari operasi.
Exceptions
Jika opsi tidak disetel.
Process(HtmlToPdfOptions)
Mengonversi dokumen HTML ke format PDF.
public static ResultContainer Process(HtmlToPdfOptions options)
Parameters
options
HtmlToPdfOptions: Objek opsi yang berisi instruksi untuk operasi.
Returns
ResultContainer : Objek yang berisi hasil dari operasi.
Exceptions
Jika opsi tidak disetel.
Namespace: Documentize Assembly: Documentize.dll