Class PdfXmlLoadOptions

PdfXmlLoadOptions class

PdfXml 格式的加载选项。

public class PdfXmlLoadOptions : LoadOptions

Constructors

NameDescription
PdfXmlLoadOptions()默认构造函数。

Properties

NameDescription
DisableFontLicenseVerifications { get; set; }获取或设置标志,以在加载文件时禁用所有字体的许可证限制。当 true 时,允许执行许可证禁止的字体操作,例如允许将字体嵌入 PDF 文档,即使许可证规则禁止该字体的嵌入。默认值为 false
LoadFormat { get; }表示 LoadOptions 描述的文件格式。
WarningHandler { get; set; }处理生成的任何警告的回调。WarningHandler 返回 ReturnAction 枚举项,指定继续或中止。继续是默认操作,加载操作将继续,但用户也可以返回中止,在这种情况下,加载操作应停止。

Examples

以下示例演示如何将 PDFXML 文件转换为 PDF 文件

[C#]
	// The path to the documents directory.
	string dataDir = @"YOUR_DATA_DIRECTORY";

	// The path to your PDFXML File.
	string pdfXmlFile = Path.Combine(dataDir, "PDFXML-to-PDF.pdfxml");

	// The path to output PDF File.
	string pdfFile = Path.Combine(dataDir, "PDFXML-to-PDF.pdf");

	// Initialize PdfXmlLoadOptions	
	PdfXmlLoadOptions pdfXmlLoadOptions = new PdfXmlLoadOptions();
		
	using (Document pdfDocument = new Document(pdfXmlFile, pdfXmlLoadOptions))
	{
	 
		// Save PDF file
		pdfDocument.Save(pdfFile);
	}
[VB.NET]

    ' The path to the documents directory.
    Dim dataDir As String = "YOUR_DATA_DIRECTORY"

    ' The path to your PDFXML File.
    Dim pdfXmlFile = Path.Combine(dataDir, "PDFXML-to-PDF.pdfxml")

    ' The path to output PDF File.
    Dim pdfFile = Path.Combine(dataDir, "PDFXML-to-PDF.pdf")
 
    ' Initialize PdfXmlLoadOptions  
    Dim pdfXmlLoadOptions As PdfXmlLoadOptions = New PdfXmlLoadOptions()
 
    Using pdfDocument As Document = New Document(pdfXmlFile, pdfXmlLoadOptions)
 
        ' Save PDF file
        pdfDocument.Save(pdfFile)
    End Using

See Also