Class OdfLoadOptions
Controls security, compatibility, and resource limits used when loading ODF documents. 控制載入 ODF 文件時使用的安全性、相容性與資源限制。
public class OdfLoadOptions
- Inheritance
-
OdfLoadOptions
- Inherited Members
Constructors
OdfLoadOptions()
public OdfLoadOptions()
Properties
AllowLazyLoading
Gets or sets a value indicating whether XML subtrees may be parsed lazily. 取得或設定是否允許延遲解析 XML 子樹節點。
public bool AllowLazyLoading { get; set; }
Property Value
CryptographyProvider
Gets or sets the cryptography provider used to decrypt encrypted package entries. 取得或設定用於解密加密封裝項目的密碼學提供者。
public IOdfCryptographyProvider? CryptographyProvider { get; set; }
Property Value
Default
Gets a new instance with the default load settings. 取得使用預設載入設定的新執行個體。
public static OdfLoadOptions Default { get; }
Property Value
EnableDirectIo
Gets or sets a value indicating whether Direct I/O is used for high-throughput file reads. 取得或設定是否啟用 Direct I/O 進行高吞吐量檔案讀取。
public bool EnableDirectIo { get; set; }
Property Value
MaxEntrySize
Gets or sets the maximum uncompressed byte count allowed for a single package entry. 取得或設定單一封裝項目解壓縮後允許的最大位元組數。
public long MaxEntrySize { get; set; }
Property Value
MaxPackageSize
Gets or sets the maximum raw package byte count for non-seekable input streams. 取得或設定不可搜尋輸入串流的原始封裝位元組數上限。
public long MaxPackageSize { get; set; }
Property Value
Remarks
This limit applies before ZIP entry expansion and is separate from MaxTotalUncompressedSize. 此限制套用於 ZIP 項目展開之前,且與 MaxTotalUncompressedSize 分開計算。
MaxTotalUncompressedSize
Gets or sets the maximum total uncompressed byte count allowed for the package. 取得或設定整個 ZIP 封裝解壓後允許的總位元組數上限。
public long MaxTotalUncompressedSize { get; set; }
Property Value
MaxXmlCharactersInDocument
Gets or sets the maximum number of XML characters allowed in a single XML document. 取得或設定單一 XML 文件允許讀取的最大字元數。
public long MaxXmlCharactersInDocument { get; set; }
Property Value
Remarks
Set this value to zero or a negative number to disable the limit. 設為 0 或負值時會停用此限制;一般應維持預設值,僅在受信任的大型文件情境中調整。
MaxZipEntries
Gets or sets the maximum number of ZIP entries allowed in a package. 取得或設定 ZIP 封裝中允許的最大專案數量。
public int MaxZipEntries { get; set; }
Property Value
OpenPgpKeyProvider
Gets or sets the OpenPGP key provider used for ODF 1.3 package decryption. 取得或設定用於解密 ODF 1.3 OpenPGP 加密文件的金鑰提供者。
public IOdfOpenPgpKeyProvider? OpenPgpKeyProvider { get; set; }
Property Value
Password
Gets or sets the password used to decrypt password-protected ODF documents. 取得或設定用於解密受密碼保護 ODF 文件的密碼。
public string? Password { get; set; }
Property Value
StrictXmlParsing
Gets or sets a value indicating whether XML parsing should fail on non-conforming input. 取得或設定是否在 XML 輸入不符合規範時直接失敗。
public bool StrictXmlParsing { get; set; }
Property Value
Remarks
When set to true, malformed XML or non-conforming structure throws immediately. 設為 true 時,XML 解析錯誤或結構不合規會立即擲出例外;設為 false(預設)時,會對損毀或非標準 ODF 輸入採取容錯處理。
ValidateMimeType
Gets or sets a value indicating whether the package mimetype entry is validated during load. 取得或設定載入時是否驗證 ZIP 最前方的 mimetype 專案內容符合 ODF 規範。
public bool ValidateMimeType { get; set; }