Table of Contents

Class OdfHybridPdfHelper

Namespace
OdfKit.Core
Assembly
OdfKit.Extensions.Pdf.dll

Embeds ODF packages in hybrid PDFs and extracts them back out. 提供混合 PDF (Hybrid PDF)的公用程式方法,支援在 PDF 中內嵌與提取 ODF 檔案。

public static class OdfHybridPdfHelper
Inheritance
OdfHybridPdfHelper
Inherited Members

Methods

ExtractOdfFromPdf(Stream, string?)

Extracts an embedded ODF package from a hybrid PDF. 從混合 PDF 檔案流中提取並讀取隱藏的 ODF 檔案。

public static byte[]? ExtractOdfFromPdf(Stream pdfStream, string? password = null)

Parameters

pdfStream Stream

The source or target object. / PDF 檔案的資料流

password string

The value to use. / PDF 檔案密碼,若無則為 null

Returns

byte[]

The result. / 傳回提取出的 ODF 檔案位元組陣列;若未找到則為 null

ExtractOdfFromPdf(string, string?)

Extracts an embedded ODF package from a hybrid PDF. 從混合 PDF 檔案中提取並讀取隱藏的 ODF 檔案。

public static byte[]? ExtractOdfFromPdf(string pdfPath, string? password = null)

Parameters

pdfPath string

The path or URI. / PDF 檔案路徑

password string

The value to use. / PDF 檔案密碼,若無則為 null

Returns

byte[]

The result. / 傳回提取出的 ODF 檔案位元組陣列;若未找到則為 null

InjectOdfToPdf(Stream, Stream, Stream, string, string?)

Embeds an ODF package into a PDF as a hybrid PDF attachment. 將 ODF 檔案流作為附件注入 PDF 檔案流中,生成混合 PDF 。

public static void InjectOdfToPdf(Stream pdfStream, Stream odfStream, Stream outputPdfStream, string odfFileName, string? password = null)

Parameters

pdfStream Stream

The source or target object. / 來源 PDF 檔案的資料流

odfStream Stream

The source or target object. / 要注入的 ODF 檔案的資料流

outputPdfStream Stream

The source or target object. / 接收輸出的混合 PDF 檔案資料流

odfFileName string

The path or URI. / 注入的 ODF 專案檔名

password string

The value to use. / PDF 密碼,若無則為 null

InjectOdfToPdf(string, string, string, string?)

Embeds an ODF package into a PDF as a hybrid PDF attachment. 將 ODF 檔案作為附件注入 PDF 中,生成混合 PDF (Hybrid PDF)。

public static void InjectOdfToPdf(string pdfPath, string odfPath, string outputPdfPath, string? password = null)

Parameters

pdfPath string

The path or URI. / 來源 PDF 檔案路徑

odfPath string

The path or URI. / 要注入的 ODF 檔案路徑

outputPdfPath string

The path or URI. / 輸出的混合 PDF 檔案路徑

password string

The value to use. / PDF 密碼,若無則為 null