Class PdfHtml

Class PdfHtml

Namespace: Aspose.Pdf.Plugins
Assembly: Aspose.PDF.dll

表示 Aspose.Pdf.Plugins.PdfHtml 插件。

public sealed class PdfHtml : IPlugin, IDisposable

继承

objectPdfHtml

实现

IPlugin, IDisposable

继承成员

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

示例

该示例演示如何将 PDF 转换为 HTML 文档。

// 创建 PdfHtml
var converter = new PdfHtml();
// 创建 PdfToHtmlOptions 对象以将输出数据类型设置为带嵌入资源的文件
var opt = new PdfToHtmlOptions(PdfToHtmlOptions.SaveDataType.FileWithEmbeddedResources);
// 添加输入文件路径
opt.AddInput(new FileDataSource(inputPath));
// 设置输出文件路径
opt.AddOutput(new FileDataSource(outputPath));
converter.Process(opt);

该示例演示如何将 HTML 转换为 PDF 文档。

// 创建 PdfHtml
var converter = new PdfHtml();
// 创建 HtmlToPdfOptions
var opt = new HtmlToPdfOptions();
// 添加输入文件路径
opt.AddInput(new FileDataSource(inputPath));
// 设置输出文件路径
opt.AddOutput(new FileDataSource(outputPath));
converter.Process(opt);

构造函数

PdfHtml()

public PdfHtml()

方法

Dispose()

IDisposable 的实现。

public void Dispose()

Process(IPluginOptions)

使用指定的参数开始 Aspose.Pdf.Plugins.PdfHtml 处理。

public ResultContainer Process(IPluginOptions options)

参数

options IPluginOptions

一个包含 Aspose.Pdf.Plugins.PdfHtml 指令的选项对象。

返回

ResultContainer

一个包含操作结果的 Aspose.Pdf.Plugins.ResultContainer 对象。

 中文