Documentize Namespaceのサブセクション
Enum ConvertErrorAction
情報
このクラスは変換エラーに対するアクションを表します。
public enum ConvertErrorAction
フィールド
Enum ConvertSoftMaskAction
情報
このアクションはソフトマスクを使用した画像の変換に関するアクションを表します。
public enum ConvertSoftMaskAction
フィールド
ConvertToStencilMask = 1
: ソフトマスクはステンシルマスクに変換されます。Default = 0
: デフォルト戦略を使用します。
情報
レンダリング中に使用される可能性のあるメディアタイプを指定します。
public enum HtmlMediaType
フィールド
Print = 0
: 印刷。Screen = 1
: スクリーン。
Enum HtmlPageLayoutOption
情報
他のオプションと組み合わせてページのサイズとレイアウトを決定するフラグを指定します。
public enum HtmlPageLayoutOption
フィールド
FitToWidestContentWidth = 3
: ページの幅が指定されたページ幅ではなく、コンテンツサイズ自体から決定されることを示します。None = 0
: HtmlPageLayoutOptionがページのサイズやレイアウトに影響を与えないことを示すデフォルト値です。ScaleToPageWidth = 256
: 文書の内容がページに収まるようにスケーリングされることを示します。
Enum PdfAStandardVersion
情報
PDF文書のPDF/A標準バージョンを指定します。
public enum PdfAStandardVersion
フィールド
Auto = 0
: PDF/A標準バージョンが自動的に決定されます。PDF_A_1A = 1
: PDF/A-1a標準バージョンを指定します。PDF_A_1B = 2
: PDF/A-1b標準バージョンを指定します。PDF_A_2A = 3
: PDF/A-2a標準バージョンを指定します。PDF_A_2B = 4
: PDF/A-2b標準バージョンを指定します。PDF_A_2U = 5
: PDF/A-2u標準バージョンを指定します。PDF_A_3A = 6
: PDF/A-3a標準バージョンを指定します。PDF_A_3B = 7
: PDF/A-3b標準バージョンを指定します。PDF_A_3U = 8
: PDF/A-3u標準バージョンを指定します。
Enum PdfToHtmlOptions.SaveDataType
public enum PdfToHtmlOptions.SaveDataType
フィールド
FileWithEmbeddedResources = 1
: 埋め込まれたリソースを持つファイルにHTMLを保存FileWithExternalResources = 0
: 外部リソースを持つファイルにHTMLを保存StreamWithEmbeddedResources = 2
: 埋め込まれたリソースを持つファイルストリームにHTMLを保存
情報
ファイル形式を .xlsx、.xls/xml または csv として指定できます。デフォルト値は XLSX です。
ファイル形式を .xlsx、.xls/xml または csv として指定できます。
デフォルト値は XLSX です。
public enum PdfToXlsOptions.ExcelFormat
Fields
CSV = 2
: カンマ区切り値 (CSV) ファイル形式。ODS = 4
: オープン・ドキュメント・スプレッドシート。XLSM = 3
: マクロ対応のオフィス・オープンXML (.xlsm) ファイル形式。XLSX = 1
: オフィス・オープンXML (.xlsx) ファイル形式。XMLSpreadSheet2003 = 0
: Excel 2003 XML (.xls) ファイル形式。
情報
PDF ドキュメントをテキストに変換するときに使用できる異なるモードを定義します。Documentize.TextExtractorOptions クラスを参照してください。
public enum TextExtractorOptions.TextFormattingMode
Fields
Plain = 2
: テキストフラグメントの相対的な位置を考慮しつつ、追加のスペースを加えずに PDF テキストコンテンツを表します。Pure = 0
: 少数のフォーマットルーチンを使用して PDF テキストコンテンツを表します。これには、相対的な位置を考慮し、テキストをページの幅に合わせるために追加のスペースを加えることが含まれます。Raw = 1
: フォーマットなしの PDF コンテンツをそのまま表します。
インターフェイス IPluginOptions
情報
具体的なプラグインオプションが実装すべき共通メソッドを定義する一般的なプラグインオプションインターフェイス。
public interface IPluginOptions
インターフェース IDataSource
情報
具体的なデータが実装すべき共通メンバーを定義する一般的なデータインターフェースです。
public interface IDataSource
プロパティ
DataType
データソースの種類です。
DataType DataType { get; }
プロパティ値
DataType
インターフェース IOperationResult
情報
具体的なプラグインの操作結果が実装すべき一般的なメソッドを定義する一般的な操作結果インターフェース。
public interface IOperationResult
プロパティ
Data
生データを取得します。
プロパティの値
object
IsFile
結果が出力ファイルへのパスであるかどうかを示します。
プロパティの値
bool
IsStream
結果が出力ストリームであるかどうかを示します。
プロパティの値
bool
IsString
結果がテキスト文字列であるかどうかを示します。
プロパティの値
bool
メソッド
ToFile()
結果をファイルに変換しようとします。
戻り値
string:結果がファイルの場合、出力ファイルへのパスを表す文字列。それ以外の場合はnull
。
ToStream()
結果をストリームオブジェクトに変換しようとします。
戻り値
Stream:結果がストリームの場合、出力データを表すストリームオブジェクト。それ以外の場合はnull
。
クラス AddTimestampOptions
情報
Documentize.Timestamp プラグインのための追加タイムスタンプオプションを表します。
public class AddTimestampOptions : PluginBaseOptions, IPluginOptions
継承
object ←
PluginBaseOptions ←
AddTimestampOptions
実装
継承メンバー
- PluginBaseOptions.AddInput(IDataSource),
- PluginBaseOptions.AddOutput(IDataSource),
- PluginBaseOptions.Inputs,
- PluginBaseOptions.Outputs,
- PluginBaseOptions.CloseInputStreams,
- PluginBaseOptions.CloseOutputStreams,
- object.GetType(),
- object.MemberwiseClone(),
- object.ToString(),
- object.Equals(object?),
- object.Equals(object?, object?),
- object.ReferenceEquals(object?, object?),
- object.GetHashCode()
コンストラクタ
AddTimestampOptions(Stream, string, string, string)
デフォルトオプションで Documentize.AddTimestampOptions オブジェクトの新しいインスタンスを初期化します。
public AddTimestampOptions(Stream pfx, string password, string serverUrl, string serverBasicAuthCredentials = "")
パラメーター
pfx
Stream: pfx ファイルへのパス。password
string: pfx ファイルのパスワード。serverUrl
string: タイムスタンプサーバーの URL。serverBasicAuthCredentials
string: 基本認証の資格情報。ユーザー名とパスワードは文字列 “username:password” にまとめられます。(オプション)。
AddTimestampOptions(string, string, string, string)
デフォルトオプションで Documentize.AddTimestampOptions オブジェクトの新しいインスタンスを初期化します。
public AddTimestampOptions(string pfx, string password, string serverUrl, string serverBasicAuthCredentials = "")
パラメーター
pfx
string: pfx ファイルへのパス。password
string: pfx ファイルのパスワード。serverUrl
string: タイムスタンプサーバーの URL。serverBasicAuthCredentials
string: 基本認証の資格情報。ユーザー名とパスワードは文字列 “username:password” にまとめられます。(オプション)。
クラス CompressOptions
情報
Documentize.Optimizer プラグインの圧縮オプションを表します。
public sealed class CompressOptions : PluginBaseOptions, IPluginOptions
継承
object ←
PluginBaseOptions ←
CompressOptions
実装
継承メンバー
- PluginBaseOptions.AddInput(IDataSource),
- PluginBaseOptions.AddOutput(IDataSource),
- PluginBaseOptions.Inputs,
- PluginBaseOptions.Outputs,
- PluginBaseOptions.CloseInputStreams,
- PluginBaseOptions.CloseOutputStreams,
- object.GetType(),
- object.ToString(),
- object.Equals(object?),
- object.Equals(object?, object?),
- object.ReferenceEquals(object?, object?),
- object.GetHashCode()
コンストラクター
CompressOptions()
Documentize.CompressOptions オブジェクトのインスタンスをデフォルトオプションで初期化します。
クラス DecryptionOptions
情報
Documentize.Security プラグインの復号オプションを表します。
public class DecryptionOptions : PluginBaseOptions, IPluginOptions
継承
object ←
PluginBaseOptions ←
DecryptionOptions
実装
継承メンバー
- PluginBaseOptions.AddInput(IDataSource),
- PluginBaseOptions.AddOutput(IDataSource),
- PluginBaseOptions.Inputs,
- PluginBaseOptions.Outputs,
- PluginBaseOptions.CloseInputStreams,
- PluginBaseOptions.CloseOutputStreams,
- object.GetType(),
- object.MemberwiseClone(),
- object.ToString(),
- object.Equals(object?),
- object.Equals(object?, object?),
- object.ReferenceEquals(object?, object?),
- object.GetHashCode()
コンストラクタ
DecryptionOptions(string)
デフォルトオプションで Documentize.DecryptionOptions オブジェクトの新しいインスタンスを初期化します。
public DecryptionOptions(string ownerPassword)
パラメーター
ownerPassword
string: オーナーパスワード。
プロパティ
OwnerPassword
オーナーパスワード。
public string OwnerPassword { get; set; }
プロパティ値
string
クラス DocConverter
情報
Documentize.DocConverter プラグインを表します。PDF ドキュメントを DOC/DOCX 形式に変換するために使用されます。
public sealed class DocConverter
継承
object ←
DocConverter
継承メンバー
例
この例では、PDF ドキュメントを Doc 形式に変換する方法を示します。
// DocConverter を作成する
var plugin = new DocConverter();
// 指示を設定するために PdfToDocOptions オブジェクトを作成する
var opt = new PdfToDocOptions();
// 入力ファイルパスを追加する
opt.AddInput(new FileDataSource(inputPath));
// 出力ファイルパスを設定する
opt.AddOutput(new FileDataSource(outputPath));
// 処理を実行する
plugin.Process(opt);
コンストラクター
DocConverter()
メソッド
Dispose()
IDisposable の実装です。
Process(PdfToDocOptions)
指定されたパラメータで Documentize.DocConverter 処理を開始します。
public ResultContainer Process(PdfToDocOptions options)
パラメーター
戻り値
ResultContainer : 操作の結果を含む Documentize.ResultContainer オブジェクトです。
クラス EncryptionOptions
情報
Documentize.Security プラグインの暗号化オプションを表します。
public class EncryptionOptions : PluginBaseOptions, IPluginOptions
継承
object ←
PluginBaseOptions ←
EncryptionOptions
実装
継承メンバー
- PluginBaseOptions.AddInput(IDataSource),
- PluginBaseOptions.AddOutput(IDataSource),
- PluginBaseOptions.Inputs,
- PluginBaseOptions.Outputs,
- PluginBaseOptions.CloseInputStreams,
- PluginBaseOptions.CloseOutputStreams,
- object.GetType(),
- object.MemberwiseClone(),
- object.ToString(),
- object.Equals(object?),
- object.Equals(object?, object?),
- object.ReferenceEquals(object?, object?),
- object.GetHashCode()
コンストラクタ
EncryptionOptions(string, string)
デフォルトオプションで Documentize.EncryptionOptions オブジェクトの新しいインスタンスを初期化します。
public EncryptionOptions(string ownerPassword, string userPassword)
パラメータ
ownerPassword
string: オーナーパスワード。userPassword
string: ユーザーパスワード。
プロパティ
OwnerPassword
オーナーパスワード。
public string OwnerPassword { get; set; }
プロパティ値
string
UserPassword
ユーザーパスワード。
public string UserPassword { get; set; }
プロパティ値
string
クラス FileDataSource
情報
プラグインの読み込みおよび保存操作のためのファイルデータを表します。
public sealed class FileDataSource : IDataSource
継承
object ←
FileDataSource
実装
継承メンバー
コンストラクター
FileDataSource(string)
指定されたパスで新しいファイルデータソースを初期化します。
public FileDataSource(string path)
パラメーター
path
string: ソースファイルへのパスを表す文字列。
プロパティ
DataType
データソースの種類。
public DataType DataType { get; }
プロパティ値
DataType
Path
現在のデータのファイルへのパスを取得します。
public string Path { get; }
プロパティ値
string
クラス FileResult
public sealed class FileResult : IOperationResult
継承
object ←
FileResult
実装
継承メンバー
プロパティ
Data
生データを取得します。
public object Data { get; }
プロパティ値
object
IsFile
結果が出力ファイルへのパスであるかどうかを示します。
public bool IsFile { get; }
プロパティ値
bool
IsStream
結果が出力ストリームであるかどうかを示します。
public bool IsStream { get; }
プロパティ値
bool
IsString
結果がテキスト文字列であるかどうかを示します。
public bool IsString { get; }
プロパティ値
bool
メソッド
ToFile()
結果をファイルに変換しようとします。
戻り値
string : 結果がファイルの場合は出力ファイルへのパスを表す文字列; それ以外の場合は null
。
ToStream()
結果をストリームオブジェクトに変換しようとします。
戻り値
Stream : 結果がストリームの場合は出力データを表すストリームオブジェクト; それ以外の場合は null
。
クラス HtmlConverter
情報
Documentize.HtmlConverter プラグインを表します。PDF ドキュメントを HTML 形式に、HTML ドキュメントを PDF 形式に変換するために使用されます。
public sealed class HtmlConverter : IDisposable
継承
object ←
HtmlConverter
実装
継承されたメンバー
例
この例では、PDF を HTML ドキュメントに変換する方法を示します。
// HtmlConverter を作成
var plugin = new HtmlConverter();
// 出力データ型を埋め込まれたリソースを持つファイルとして設定するために PdfToHtmlOptions オブジェクトを作成
var opt = new PdfToHtmlOptions(PdfToHtmlOptions.SaveDataType.FileWithEmbeddedResources);
// 入力ファイルパスを追加
opt.AddInput(new FileDataSource(inputPath));
// 出力ファイルパスを設定
opt.AddOutput(new FileDataSource(outputPath));
plugin.Process(opt);
この例では、HTML を PDF ドキュメントに変換する方法を示します。
// HtmlConverter を作成
var plugin = new HtmlConverter();
// HtmlToPdfOptions を作成
var opt = new HtmlToPdfOptions();
// 入力ファイルパスを追加
opt.AddInput(new FileDataSource(inputPath));
// 出力ファイルパスを設定
opt.AddOutput(new FileDataSource(outputPath));
plugin.Process(opt);
コンストラクター
HtmlConverter()
メソッド
Dispose()
IDisposable の実装。
Process(IPluginOptions)
指定されたパラメーターで Documentize.HtmlConverter の処理を開始します。
public ResultContainer Process(IPluginOptions options)
パラメーター
戻り値
ResultContainer : 操作の結果を含む Documentize.ResultContainer オブジェクトです。
クラス HtmlToPdfOptions
情報
Documentize.HtmlConverterプラグインのHTMLからPDFへの変換オプションを表します。
public sealed class HtmlToPdfOptions : PluginBaseOptions, IPluginOptions
継承
object ←
PluginBaseOptions ←
HtmlToPdfOptions
実装
継承されたメンバー
- PluginBaseOptions.AddInput(IDataSource),
- PluginBaseOptions.AddOutput(IDataSource),
- PluginBaseOptions.Inputs,
- PluginBaseOptions.Outputs,
- PluginBaseOptions.CloseInputStreams,
- PluginBaseOptions.CloseOutputStreams,
- object.GetType(),
- object.ToString(),
- object.Equals(object?),
- object.Equals(object?, object?),
- object.ReferenceEquals(object?, object?),
- object.GetHashCode()
コンストラクター
HtmlToPdfOptions()
Documentize.HtmlToPdfOptionsオブジェクトの新しいインスタンスを初期化します。
public HtmlToPdfOptions()
プロパティ
BasePath
HTMLファイルのベースパス/URL。
public string BasePath { get; set; }
プロパティ値
string
レンダリング中に使用される可能性のあるメディアタイプを取得または設定します。
public HtmlMediaType HtmlMediaType { get; set; }
プロパティ値
HtmlMediaType
IsRenderToSinglePage
ドキュメント全体を単一ページにレンダリングするかどうかを取得または設定します。
public bool IsRenderToSinglePage { get; set; }
プロパティ値
bool
PageInfo
ドキュメントのページ情報を取得または設定します。
public PageInfo PageInfo { get; set; }
プロパティ値
PageInfo
PageLayoutOption
レイアウトオプションを取得または設定します。
public HtmlPageLayoutOption PageLayoutOption { get; set; }
プロパティ値
HtmlPageLayoutOption
情報
Documentize.ImageExtractor プラグインを表します。PDF ドキュメントから画像を抽出するために使用されます。
public class ImageExtractor : PdfExtractor, IDisposable
継承
object ←
PdfExtractor ←
ImageExtractor
実装
継承されたメンバー
- PdfExtractor.Process(IPluginOptions),
- PdfExtractor.Dispose(),
- object.GetType(),
- object.MemberwiseClone(),
- object.ToString(),
- object.Equals(object?),
- object.Equals(object?, object?),
- object.ReferenceEquals(object?, object?),
- object.GetHashCode()
例
この例は、PDF ドキュメントから画像を抽出する方法を示しています。
// 画像を抽出するための ImageExtractor オブジェクトを作成
using (var plugin = new ImageExtractor())
{
// ImageExtractorOptions を作成
var opt = new ImageExtractorOptions();
// 入力ファイルパスを追加
opt.AddInput(new FileDataSource(inputPath));
// 出力ディレクトリを設定
opt.AddInput(new FileDataSource("D:\\"));
// 抽出処理を実行
var resultContainer = plugin.Process(opt);
// ResultContainer オブジェクトから画像を取得
var imageExtracted = resultContainer.ResultCollection[0].ToFile();
}
コンストラクタ
情報
Documentize.ImageExtractor プラグインの画像抽出オプションを表します。
public sealed class ImageExtractorOptions : PdfExtractorOptions, IPluginOptions
継承
object ←
PdfExtractorOptions ←
ImageExtractorOptions
実装
継承されたメンバー
- PdfExtractorOptions.AddInput(IDataSource),
- PdfExtractorOptions.Inputs,
- PdfExtractorOptions.OperationName,
- object.GetType(),
- object.ToString(),
- object.Equals(object?),
- object.Equals(object?, object?),
- object.ReferenceEquals(object?, object?),
- object.GetHashCode()
コメント
入力 PDF ドキュメントを表すデータ(ファイル、ストリーム)を追加するための機能を継承します。
コンストラクタ
Documentize.ImageExtractorOptions オブジェクトの新しいインスタンスを初期化します。
public ImageExtractorOptions()
プロパティ
操作の名前を返します。
public override string OperationName { get; }
プロパティ値
string
クラス JpegConverter
情報
Documentize.JpegConverter プラグインを表します。PDF ドキュメントを JPEG 形式に変換するために使用されます。
public sealed class JpegConverter
継承
object ←
JpegConverter
継承されたメンバー
例
この例は、PDF ドキュメントを JPEG 形式に変換する方法を示しています。
// JpegConverter を作成
var plugin = new JpegConverter();
// 指示を設定するための PdfToJpegOptions オブジェクトを作成
var opt = new PdfToJpegOptions();
// 入力ファイルパスを追加
opt.AddInput(new FileDataSource(inputPath));
// 出力ファイルパスを設定
opt.AddOutput(new DirectoryDataSource(outputPath));
// プロセスを実行
plugin.Process(opt);
コンストラクター
JpegConverter()
メソッド
Process(PdfToJpegOptions)
指定されたパラメーターで Documentize.JpegConverter の処理を開始します。
public ResultContainer Process(PdfToJpegOptions options)
パラメーター
戻り値
ResultContainer : 操作の結果を含む ResultContainer オブジェクト。
クラス MergeOptions
情報
Documentize.Merger プラグインのマージオプションを表します。
public sealed class MergeOptions : PluginBaseOptions, IPluginOptions
継承
object ←
PluginBaseOptions ←
MergeOptions
実装
継承メンバー
- PluginBaseOptions.AddInput(IDataSource),
- PluginBaseOptions.AddOutput(IDataSource),
- PluginBaseOptions.Inputs,
- PluginBaseOptions.Outputs,
- PluginBaseOptions.CloseInputStreams,
- PluginBaseOptions.CloseOutputStreams,
- object.GetType(),
- object.ToString(),
- object.Equals(object?),
- object.Equals(object?, object?),
- object.ReferenceEquals(object?, object?),
- object.GetHashCode()
コンストラクタ
MergeOptions()
デフォルトオプションで Documentize.MergeOptions オブジェクトの新しいインスタンスを初期化します。
クラス ObjectResult
public sealed class ObjectResult : IOperationResult
継承
object ←
ObjectResult
実装
継承したメンバー
プロパティ
Data
生のデータを取得します。
public object Data { get; }
プロパティの値
object
IsFile
結果が出力ファイルへのパスであるかどうかを示します。
public bool IsFile { get; }
プロパティの値
bool
IsObject
結果がオブジェクトであるかどうかを示します。
public bool IsObject { get; }
プロパティの値
bool
IsStream
結果が出力ファイルへのパスであるかどうかを示します。
public bool IsStream { get; }
プロパティの値
bool
IsString
結果が文字列であるかどうかを示します。
public bool IsString { get; }
プロパティの値
bool
Text
結果の文字列表現を返します。
public string Text { get; }
プロパティの値
string
メソッド
ToFile()
結果をファイルに変換しようとします。
戻り値
string : 結果がファイルである場合の出力ファイルへのパスを表す文字列; そうでなければ null
。
ToStream()
結果をストリームオブジェクトに変換しようとします。
戻り値
Stream : 結果がストリームである場合の出力データを表すストリームオブジェクト; そうでなければ null
。
ToString()
結果を文字列に変換しようとします。
public override string ToString()
戻り値
string : 結果が文字列である場合はテキストコンテンツを表す文字列; そうでなければ base.ToString() を返します。
クラス OptimizeOptions
情報
Documentize.Optimizer プラグインの最適化オプションを表します。
public sealed class OptimizeOptions : PluginBaseOptions, IPluginOptions
継承
object ←
PluginBaseOptions ←
OptimizeOptions
実装
継承メンバー
- PluginBaseOptions.AddInput(IDataSource),
- PluginBaseOptions.AddOutput(IDataSource),
- PluginBaseOptions.Inputs,
- PluginBaseOptions.Outputs,
- PluginBaseOptions.CloseInputStreams,
- PluginBaseOptions.CloseOutputStreams,
- object.GetType(),
- object.ToString(),
- object.Equals(object?),
- object.Equals(object?, object?),
- object.ReferenceEquals(object?, object?),
- object.GetHashCode()
コンストラクター
OptimizeOptions()
Documentize.OptimizeOptions オブジェクトの新しいインスタンスをデフォルトのオプションで初期化します。
ドキュメントを線形化して、
- 最初のページをできるだけ早く開く;
- 次のページをできるだけ早く表示するか、リンクをたどって次のページに進む;
- ページのデータが遅いチャネルを介して配信される際に、到着するにつれてページをインクリメンタルに表示する(最も有用なデータを最初に表示する);
- ユーザーがリンクをたどるなどのインタラクションを、全ページが受信されて表示される前に実行できるようにする。
クラス PdfAConverter
情報
PDF/A形式のPDF文書の変換を処理し、PDF/Aの適合性の検証を行うプラグインを表します。
public sealed class PdfAConverter
継承
object ←
PdfAConverter
継承メンバー
例
この例では、PDF文書のPDF/A形式(この場合はPDF/A-1a)に対する適合性を検証する方法を示します:
// 検証プロセスを設定するためのオプションクラスを作成
var options = new PdfAValidateOptions
{
PdfAVersion = PdfAStandardVersion.PDF_A_1A
};
// 検証する1つ以上のファイルを追加
options.AddInput(new FileDataSource("path_to_your_first_pdf_file.pdf")); // 実際のファイルパスに置き換えてください
options.AddInput(new FileDataSource("path_to_your_second_pdf_file.pdf"));
// 必要に応じてさらにファイルを追加
// プラグインインスタンスを作成
var plugin = new PdfAConverter();
// 検証を実行し、結果を取得
var resultContainer = plugin.Process(options);
// 各ファイルの検証結果を確認するにはresultContainer.ResultCollectionプロパティをチェックします:
for (var i = 0; i < resultContainer.ResultCollection.Count; i++)
{
var result = resultContainer.ResultCollection[i];
var validationResult = (PdfAValidationResult) result.Data;
var isValid = validationResult.IsValid; // i番目の文書の検証結果
}
この例では、PDF文書をPDF/A形式(この場合はPDF/A-3b)に変換する方法を示します:
// 変換プロセスを設定するためのオプションクラスを作成
var options = new PdfAConvertOptions
{
PdfAVersion = PdfAStandardVersion.PDF_A_3B
};
// ソースファイルを追加
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf")); // 実際のファイルパスに置き換えてください
// 変換されたファイルを保存するパスを追加
options.AddOutput(new FileDataSource("path_to_the_converted_file.pdf"));
// プラグインインスタンスを作成
var plugin = new PdfAConverter();
// 変換を実行
plugin.Process(options);
コンストラクター
PdfAConverter()
メソッド
Process(IPluginOptions)
指定されたオプションでPDF/A変換または検証プロセスを開始します。
public ResultContainer Process(IPluginOptions options)
パラメーター
options
IPluginOptions: プラグインの指示を含むオプションオブジェクト。Documentize.PdfAConvertOptionsまたはDocumentize.PdfAValidateOptionsクラスのインスタンスである必要があります。
戻り値
ResultContainer : 処理の結果を含むDocumentize.ResultContainerオブジェクト。
クラス PdfAConvertOptions
情報
Documentize.PdfAConverter プラグインを使用して PDF ドキュメントを PDF/A 形式に変換するためのオプションを表します。
public sealed class PdfAConvertOptions : PdfAOptionsBase, IPluginOptions
継承
object ←
PdfAOptionsBase ←
PdfAConvertOptions
実装
継承メンバー
- PdfAOptionsBase.AddInput(IDataSource),
- PdfAOptionsBase.Inputs,
- PdfAOptionsBase.PdfAVersion,
- PdfAOptionsBase.IsLowMemoryMode,
- PdfAOptionsBase.LogOutputSource,
- PdfAOptionsBase.ErrorAction,
- PdfAOptionsBase.SoftMaskAction,
- PdfAOptionsBase.CheckDifferentNamesInFontDictionaries,
- PdfAOptionsBase.AlignText,
- PdfAOptionsBase.OptimizeFileSize,
- PdfAOptionsBase.IccProfileFileName,
- object.GetType(),
- object.ToString(),
- object.Equals(object?),
- object.Equals(object?, object?),
- object.ReferenceEquals(object?, object?),
- object.GetHashCode()
コンストラクター
PdfAConvertOptions()
public PdfAConvertOptions()
プロパティ
Outputs
追加されたターゲット(ファイルまたはストリームデータソース)のコレクションを取得します。
public List<idatasource> Outputs { get; }
プロパティ値
List<IDataSource>
メソッド
AddOutput(IDataSource)
新しい結果保存ターゲットを追加します。
public void AddOutput(IDataSource dataSource)
パラメーター
dataSource
IDataSource: 操作結果を保存するためのターゲット(ファイルまたはストリームデータソース)。 :
クラス PdfAOptionsBase
情報
Documentize.PdfAConverter プラグインオプションのベース クラスを表します。このクラスは、PDF/A 変換と検証プロセスを構成するためのプロパティとメソッドを提供します。
Documentize.PdfAConverter プラグインオプションのベース クラスを表します。
このクラスは、PDF/A 変換と検証プロセスを構成するためのプロパティとメソッドを提供します。
public abstract class PdfAOptionsBase : IPluginOptions
継承
object ←
PdfAOptionsBase
派生
実装
継承メンバー
コンストラクター
PdfAOptionsBase()
protected PdfAOptionsBase()
プロパティ
AlignText
PDF/A 変換プロセス中にテキストの整列を維持するために追加手段が必要かどうかを示す値を取得または設定します。
public bool AlignText { get; set; }
プロパティ値
bool
備考
true に設定すると、変換プロセスは元のテキストセグメントの境界を復元しようとします。
ほとんどの文書では、このプロパティをデフォルトのfalse値から変更する必要はありません。
デフォルトの変換プロセス中にテキスト整列は変更されないためです。
CheckDifferentNamesInFontDictionaries
ソース PDF ドキュメントが PDF 仕様に対応していない場合の PDF/A 変換を制御するフラグを取得します。
public bool CheckDifferentNamesInFontDictionaries { get; set; }
プロパティ値
bool
ErrorAction
変換できないオブジェクトに対して実行されるアクションを取得または設定します。
public ConvertErrorAction ErrorAction { get; set; }
プロパティ値
ConvertErrorAction
IccProfileFileName
デフォルトの ICC (国際色彩協会) プロファイルの代わりに PDF/A 変換で使用されるプロファイルのファイル名を取得または設定します。
public string IccProfileFileName { get; set; }
プロパティ値
string
データソースのコレクションを取得します。
public List<idatasource> Inputs { get; }
プロパティ値
List<IDataSource>
IsLowMemoryMode
PDF/A 変換プロセス中に低メモリモードが有効になっているかどうかを示す値を取得または設定します。
public bool IsLowMemoryMode { get; set; }
プロパティ値
bool
LogOutputSource
ログ出力のデータソースを取得または設定します。
public IDataSource LogOutputSource { get; set; }
プロパティ値
IDataSource
OptimizeFileSize
PDF/A 変換プロセス中にファイルサイズを縮小するかどうかを示す値を取得または設定します。
public bool OptimizeFileSize { get; set; }
プロパティ値
bool
備考
trueに設定すると、変換プロセスは結果として得られるファイルサイズを最小限に抑えようとします。
これにより、変換プロセスのパフォーマンスに影響を与える可能性があります。
PdfAVersion
検証または変換のために使用される PDF/A 仕様のバージョンを取得または設定します。
public PdfAStandardVersion PdfAVersion { get; set; }
プロパティ値
PdfAStandardVersion
備考
PDF/A 仕様のバージョンは、PDF/A 検証および変換の準拠レベルを決定するために使用されます。
バージョンが Documentize.PdfAStandardVersion.Auto に設定されている場合、システムはドキュメントメタデータに基づいて検証のために適切な PDF/A 仕様バージョンを自動的に決定します。
PDF/A 変換プロセスの場合、Documentize.PdfAStandardVersion.Auto は PDF/A-1b 仕様バージョンをデフォルトとします。
SoftMaskAction
ソフトマスク付き画像の変換中に実行されるアクションを取得または設定します。
public ConvertSoftMaskAction SoftMaskAction { get; set; }
プロパティ値
ConvertSoftMaskAction
メソッド
コレクションに新しいデータソースを追加します。
public void AddInput(IDataSource dataSource)
パラメータ
クラス PdfAValidateOptions
情報
Documentize.PdfAConverterプラグインを使用してPDF文書のPDF/A適合性を検証するためのオプションを表します。
public sealed class PdfAValidateOptions : PdfAOptionsBase, IPluginOptions
継承
object ←
PdfAOptionsBase ←
PdfAValidateOptions
実装
継承メンバー
- PdfAOptionsBase.AddInput(IDataSource),
- PdfAOptionsBase.Inputs,
- PdfAOptionsBase.PdfAVersion,
- PdfAOptionsBase.IsLowMemoryMode,
- PdfAOptionsBase.LogOutputSource,
- PdfAOptionsBase.ErrorAction,
- PdfAOptionsBase.SoftMaskAction,
- PdfAOptionsBase.CheckDifferentNamesInFontDictionaries,
- PdfAOptionsBase.AlignText,
- PdfAOptionsBase.OptimizeFileSize,
- PdfAOptionsBase.IccProfileFileName,
- object.GetType(),
- object.ToString(),
- object.Equals(object?),
- object.Equals(object?, object?),
- object.ReferenceEquals(object?, object?),
- object.GetHashCode()
コンストラクター
PdfAValidateOptions()
public PdfAValidateOptions()
クラス PdfAValidationResult
public sealed class PdfAValidationResult
継承
object ←
PdfAValidationResult
継承メンバー
フィールド
DataSource 検証されたデータソースを取得します。
フィールドの値
IDataSource
IsValid
検証が成功したかどうかを示す値を取得します。
public readonly bool IsValid
フィールドの値
bool
StandardVersion
検証に使用された PDF/A 標準バージョンを取得します。
public readonly PdfAStandardVersion StandardVersion
フィールドの値
PdfAStandardVersion
クラス PdfChatGpt
public sealed class PdfChatGpt : IDisposable
継承
object ←
PdfChatGpt
実装
継承メンバー
例
この例では、リクエストにメッセージを追加することでPdfChatGptプラグインを使用する方法を示します。
using (var plugin = new PdfChatGpt())
{
var options = new PdfChatGptRequestOptions();
options.AddOutput(new FileDataSource("PdfChatGPT_output.pdf")); // 出力ファイルパスを追加します。
options.ApiKey = "Your API key."; // APIにアクセスするためのキーを提供する必要があります。
options.MaxTokens = 1000; // チャットの完成に生成する最大トークン数。
// リクエストメッセージを追加します。
options.Messages.Add(new Message
{
Content = "You are a helpful assistant.",
Role = Role.System
});
options.Messages.Add(new Message
{
Content = "What is the biggest pizza diameter ever made?",
Role = Role.User
});
// リクエストを処理します。
var result = await plugin.ProcessAsync(options);
var fileResultPath = result.ResultCollection[0].Data;
var chatCompletionObject = result.ResultCollection[1].Data as ChatCompletion; // ChatGPT APIのチャット補完オブジェクト。
}
この例では、リクエストに1つのメッセージを追加することでPdfChatGptプラグインを使用する方法を示します。
using (var plugin = new PdfChatGpt())
{
var options = new PdfChatGptRequestOptions();
options.AddOutput(new FileDataSource("PdfChatGPT_output.pdf")); // 出力ファイルパスを追加します。
options.ApiKey = "Your API key."; // APIにアクセスするためのキーを提供する必要があります。
options.MaxTokens = 1000; // チャットの完成に生成する最大トークン数。
// リクエストメッセージを追加します。
// この場合、Content = "You are a helpful assistant." のシステムメッセージがデフォルトで追加されます。
// クエリメッセージの役割はデフォルトで "user" です。
options.Query = "What is the lowest temperature recorded on the Earth?";
// リクエストを処理します。
var result = await plugin.ProcessAsync(options);
var fileResultPath = result.ResultCollection[0].Data;
var chatCompletionObject = result.ResultCollection[1].Data as ChatCompletion; // ChatGPT APIのチャット補完オブジェクト。
}
この例では、ファイルをメッセージソースとして追加することでPdfChatGptプラグインを使用する方法を示します。
using (var plugin = new PdfChatGpt())
{
var options = new PdfChatGptRequestOptions();
options.AddOutput(new FileDataSource("PdfChatGPT_output.pdf")); // 出力ファイルパスを追加します。
// PDFテキストソースを追加します。
// 複数のソースがある場合、各ドキュメントからのテキストは "user" の役割を持つ別々のメッセージとしてリクエストメッセージコレクションに追加されます。
options.AddInput(new FileDataSource("TextSource.pdf"));
options.ApiKey = "Your API key."; // APIにアクセスするためのキーを提供する必要があります。
options.MaxTokens = 1000; // チャットの完成に生成する最大トークン数。
// リクエストメッセージを追加します。
// この場合、Content = "You are a helpful assistant." のシステムメッセージがデフォルトで追加されます。
// クエリメッセージの役割はデフォルトで "user" です。
options.Query = "How many letters in the provided text?";
// リクエストを処理します。
var result = await plugin.ProcessAsync(options);
var fileResultPath = result.ResultCollection[0].Data;
var chatCompletionObject = result.ResultCollection[1].Data as ChatCompletion; // ChatGPT APIのチャット補完オブジェクト。
}
注意事項
Documentize.PdfChatGptオブジェクトは、ChatGPTに直接リクエストを送信するため、またはPDFファイルソースを追加して応答を出力ソースに保存するために使用されます。
コンストラクタ
PdfChatGpt()
Documentize.PdfChatGptオブジェクトの新しいインスタンスを初期化します。
メソッド
Dispose()
IDisposableの実装。実際には、PdfChatGptには必要ありません。
Process(IPluginOptions)
このメソッドには同期版はありません。代わりにProcessAsyncメソッドを使用してください。
public ResultContainer Process(IPluginOptions options)
パラメータ
戻り値
ResultContainer : #### 例外
NotImplementedException
ProcessAsync(IPluginOptions)
指定されたパラメータでPdfChatGpt処理を開始します。
public Task<resultcontainer> ProcessAsync(IPluginOptions options)
パラメータ
戻り値
Task<ResultContainer>
非同期操作を表すタスクオブジェクト。
例外
ArgumentException : InvalidOperationException
SetCancellationToken(CancellationToken)
キャンセルトークンを設定します。
public void SetCancellationToken(CancellationToken cancellationToken)
パラメータ
クラス PdfChatGptOptions
情報
Documentize.PdfChatGpt プラグインのオプションを表します。
public class PdfChatGptOptions : IPluginOptions
継承
object ←
PdfChatGptOptions
派生
実装
継承されたメンバー
コンストラクタ
PdfChatGptOptions()
Documentize.PdfChatGptOptions オブジェクトの新しいインスタンスを初期化します。
public PdfChatGptOptions()
プロパティ
public List<idatasource> Inputs { get; }
プロパティ値
List<IDataSource>
Outputs
public List<idatasource> Outputs { get; }
プロパティ値
List<IDataSource>
メソッド
PdfChatGpt プラグインのデータコレクションに新しいデータソースを追加します。
public void AddInput(IDataSource dataSource)
パラメーター
AddOutput(IDataSource)
PdfChatGpt プラグインのデータコレクションに新しい保存データソースを追加します。
public void AddOutput(IDataSource saveDataSource)
パラメーター
saveDataSource
IDataSource: 操作結果を保存するためのデータソース(ファイルまたはストリーム)。
クラス PdfChatGptRequestOptions
情報
Documentize.PdfChatGpt プラグインのオプションを表します。
public class PdfChatGptRequestOptions : PdfChatGptOptions, IPluginOptions
継承
object ←
PdfChatGptOptions ←
PdfChatGptRequestOptions
実装
継承メンバー
- PdfChatGptOptions.AddInput(IDataSource),
- PdfChatGptOptions.AddOutput(IDataSource),
- PdfChatGptOptions.Inputs,
- PdfChatGptOptions.Outputs,
- object.GetType(),
- object.MemberwiseClone(),
- object.ToString(),
- object.Equals(object?),
- object.Equals(object?, object?),
- object.ReferenceEquals(object?, object?),
- object.GetHashCode()
コンストラクター
PdfChatGptRequestOptions()
Documentize.PdfChatGptRequestOptions オブジェクトの新しいインスタンスをデフォルトのオプションで初期化します。
public PdfChatGptRequestOptions()
PdfChatGptRequestOptions(string, string, string, string)
オプションを指定して Documentize.PdfChatGptRequestOptions オブジェクトの新しいインスタンスを初期化します。
public PdfChatGptRequestOptions(string apiKey, string model, string apiUrl, string query)
パラメーター
プロパティ
ApiKey
ChatGPT API へのアクセスキーを取得または設定します。
public string ApiKey { get; set; }
プロパティ値
string
ApiUrl
ChatGPT API の URL を取得または設定します。
public string ApiUrl { get; set; }
プロパティ値
string
MaxTokens
レスポンス内のトークンの最大数。
デフォルト値は null で、無限を意味します。
public int? MaxTokens { get; set; }
プロパティ値
int?
Messages
Documentize.Message オブジェクトのコレクションを取得または設定します。
public List<message> Messages { get; set; }
プロパティ値
List<Message>
Model
使用するモデルの ID を設定または取得します。
public string Model { get; set; }
プロパティ値
string
NumberOfChoices
各入力メッセージのために生成するチャット完了オプションの数。
public int NumberOfChoices { get; set; }
プロパティ値
int
Query
ChatGPT への文字列リクエストを取得または設定します。
空でない場合、これはコレクション内の最初のメッセージとなり、リクエストに送信されます。
public string Query { get; set; }
プロパティ値
string
Temperature
使用するサンプリング温度、範囲は 0 から 2。
高い値(例えば 0.8)は出力をよりランダムにし、
低い値(例えば 0.2)はより焦点を絞った決定論的なものにします。
デフォルト値は 1 です。
public double Temperature { get; set; }
プロパティ値
double
クラス PdfConverterOptions
情報
Pdf コンバータ プラグインのオプションを表します。
public abstract class PdfConverterOptions : IPluginOptions
継承
object ←
PdfConverterOptions
派生
実装
継承されたメンバー
プロパティ
PdfConverterOptions プラグインデータコレクションを返します。
public List<idatasource> Inputs { get; }
プロパティ値
List<IDataSource>
出力
保存操作結果の追加対象コレクションを取得します。
public List<idatasource> Outputs { get; }
プロパティ値
List<IDataSource>
メソッド
PdfConverter プラグインデータコレクションに新しいデータソースを追加します。
public void AddInput(IDataSource dataSource)
パラメータ
AddOutput(IDataSource)
PdfToXLSXConverterOptions プラグインデータコレクションに新しいデータソースを追加します。
public void AddOutput(IDataSource saveDataSource)
パラメータ
saveDataSource
IDataSource: 保存操作結果のためのデータソース (ファイルまたはストリーム)。
例外
NotImplementedException
情報
PDF 文書のページに存在する可能性のあるテキスト、画像、その他のタイプのコンテンツを抽出するための基本機能を表します。
public abstract class PdfExtractor : IDisposable
継承
object ←
PdfExtractor
派生
実装
継承されたメンバー
例
この例では、PDF 文書のテキストコンテンツを抽出する方法を示します。
// PDF コンテンツを抽出するために TextExtractor オブジェクトを作成
using (TextExtractor extractor = new TextExtractor())
{
// 指示を設定するために TextExtractorOptions オブジェクトを作成
textExtractorOptions = new TextExtractorOptions();
// 入力ファイルパスを追加
textExtractorOptions.AddInput(new FileDataSource(inputPath));
// 抽出プロセスを実行
ResultContainer resultContainer = extractor.Process(textExtractorOptions);
// ResultContainer オブジェクトから抽出したテキストを取得
string textExtracted = resultContainer.ResultCollection[0].ToString();
}
備考
Documentize.TextExtractor オブジェクトはテキストを抽出するために使用され、Documentize.ImageExtractor は画像を抽出するために使用されます。
コンストラクター
メソッド
IDisposable の実装。実際には、PdfExtractor のために必要ではありません。
指定されたパラメータで PdfExtractor の処理を開始します。
public ResultContainer Process(IPluginOptions pdfExtractorOptions)
パラメーター
pdfExtractorOptions
IPluginOptions: PdfExtractor のための指示を含むオプションオブジェクト。
戻り値
ResultContainer : 抽出の結果を含む ResultContainer オブジェクト。
情報
TextExtractorとImageExtractorプラグインのオプションを表します。
public abstract class PdfExtractorOptions : IPluginOptions
継承
object ←
PdfExtractorOptions
派生
実装
継承されたメンバー
備考
Documentize.PdfExtractorOptionsは、入力PDF文書を表すデータ(ファイル、ストリーム)を追加するための基本機能を含んでいます。
この代わりにDocumentize.TextExtractorOptionsまたはImageExtractorOptionsを作成してください。
プロパティ
PdfExtractorプラグインデータコレクションを返します。
public List<idatasource> Inputs { get; }
プロパティ値
List<IDataSource>
操作名を返します。
public virtual string OperationName { get; }
プロパティ値
string
メソッド
PdfExtractorプラグインデータコレクションに新しいデータソースを追加します。
public void AddInput(IDataSource dataSource)
パラメーター
クラス PdfToDocOptions
情報
Documentize.DocConverter プラグインの PDF から DOC への変換オプションを表します。
public sealed class PdfToDocOptions : PdfConverterOptions, IPluginOptions
継承
object ←
PdfConverterOptions ←
PdfToDocOptions
実装
継承されたメンバー
- PdfConverterOptions.AddInput(IDataSource),
- PdfConverterOptions.AddOutput(IDataSource),
- PdfConverterOptions.Inputs,
- PdfConverterOptions.Outputs,
- object.GetType(),
- object.ToString(),
- object.Equals(object?),
- object.Equals(object?, object?),
- object.ReferenceEquals(object?, object?),
- object.GetHashCode()
コンストラクタ
PdfToDocOptions()
Documentize.PdfToDocOptions オブジェクトの新しいインスタンスをデフォルトオプションで初期化します。
クラス PdfToHtmlOptions
情報
Documentize.HtmlConverter プラグイン用の PDF から HTML への変換オプションを表します。
public sealed class PdfToHtmlOptions : PdfConverterOptions, IPluginOptions
継承
object ←
PdfConverterOptions ←
PdfToHtmlOptions
実装
継承されたメンバー
- PdfConverterOptions.AddInput(IDataSource),
- PdfConverterOptions.AddOutput(IDataSource),
- PdfConverterOptions.Inputs,
- PdfConverterOptions.Outputs,
- object.GetType(),
- object.ToString(),
- object.Equals(object?),
- object.Equals(object?, object?),
- object.ReferenceEquals(object?, object?),
- object.GetHashCode()
コンストラクター
PdfToHtmlOptions()
Documentize.PdfToHtmlOptions オブジェクトの新しいインスタンスをデフォルトのオプションで初期化します。
public PdfToHtmlOptions()
PdfToHtmlOptions(SaveDataType)
指定された出力データ型のための Documentize.PdfToHtmlOptions オブジェクトの新しいインスタンスを初期化します。
public PdfToHtmlOptions(PdfToHtmlOptions.SaveDataType outputDataType)
パラメーター
プロパティ
OutputDataType
出力データ型を取得します。
public PdfToHtmlOptions.SaveDataType OutputDataType { get; }
プロパティ値
PdfToHtmlOptions.SaveDataType
クラス PdfToJpegOptions
情報
Documentize.JpegConverterプラグインのPDFからJPEGへの変換オプションを表します。
public sealed class PdfToJpegOptions : PluginBaseOptions, IPluginOptions
継承
object ←
PluginBaseOptions ←
PdfToJpegOptions
実装
継承メンバー
コンストラクター
PdfToJpegOptions()
Documentize.PdfToJpegOptionsオブジェクトの新しいインスタンスを初期化します。
public PdfToJpegOptions()
プロパティ
OutputResolution
結果の画像の解像度値を取得または設定します。
public int OutputResolution { get; set; }
プロパティ値
int
PageList
処理するページのリストを取得または設定します。
public List<int> PageList { get; set; }
プロパティ値
List<int>
Quality
出力品質を取得または設定します。
public int Quality { get; set; }
プロパティ値
int
クラス PdfToPngOptions
情報
Documentize.PngConverter プラグインの PDF から PNG への変換オプションを表します。
public sealed class PdfToPngOptions : PluginBaseOptions, IPluginOptions
継承
object ←
PluginBaseOptions ←
PdfToPngOptions
実装
継承メンバー
- PluginBaseOptions.AddInput(IDataSource),
- PluginBaseOptions.AddOutput(IDataSource),
- PluginBaseOptions.Inputs,
- PluginBaseOptions.Outputs,
- PluginBaseOptions.CloseInputStreams,
- PluginBaseOptions.CloseOutputStreams,
- object.GetType(),
- object.ToString(),
- object.Equals(object?),
- object.Equals(object?, object?),
- object.ReferenceEquals(object?, object?),
- object.GetHashCode()
コンストラクター
PdfToPngOptions()
Documentize.PdfToPngOptions オブジェクトの新しいインスタンスを初期化します。
プロパティ
OutputResolution
生成される画像の解像度値を取得または設定します。
public int OutputResolution { get; set; }
プロパティ値
int
PageList
処理するページのリストを取得または設定します。
public List<int> PageList { get; set; }
プロパティ値
List<int>
クラス PdfToTiffOptions
情報
Documentize.TiffConverterプラグインのPDFからTIFFへのコンバータオプションを表します。
public sealed class PdfToTiffOptions : PluginBaseOptions, IPluginOptions
継承
object ←
PluginBaseOptions ←
PdfToTiffOptions
実装
継承されたメンバー
- PluginBaseOptions.AddInput(IDataSource),
- PluginBaseOptions.AddOutput(IDataSource),
- PluginBaseOptions.Inputs,
- PluginBaseOptions.Outputs,
- PluginBaseOptions.CloseInputStreams,
- PluginBaseOptions.CloseOutputStreams,
- object.GetType(),
- object.ToString(),
- object.Equals(object?),
- object.Equals(object?, object?),
- object.ReferenceEquals(object?, object?),
- object.GetHashCode()
コンストラクタ
PdfToTiffOptions()
Documentize.PdfToTiffOptionsオブジェクトの新しいインスタンスを初期化します。
public PdfToTiffOptions()
プロパティ
MultiPage
すべてのページを1つのマルチページTIFFとして保存することを許可するフラグを取得または設定します。
public bool MultiPage { get; set; }
プロパティ値
bool
OutputResolution
生成される画像の解像度値を取得または設定します。
public int OutputResolution { get; set; }
プロパティ値
int
PageList
処理のためのページのリストを取得または設定します。
public List<int> PageList { get; set; }
プロパティ値
List<int>
クラス PdfToXlsOptions
情報
Documentize.XlsConverter プラグインの PDF から XLSX への変換オプションを表します。
public sealed class PdfToXlsOptions : PdfConverterOptions, IPluginOptions
継承
object ←
PdfConverterOptions ←
PdfToXlsOptions
実装
継承されたメンバー
- PdfConverterOptions.AddInput(IDataSource),
- PdfConverterOptions.AddOutput(IDataSource),
- PdfConverterOptions.Inputs,
- PdfConverterOptions.Outputs,
- object.GetType(),
- object.ToString(),
- object.Equals(object?),
- object.Equals(object?, object?),
- object.ReferenceEquals(object?, object?),
- object.GetHashCode()
コンストラクター
PdfToXlsOptions()
デフォルトのオプションで Documentize.PdfToXlsOptions オブジェクトの新しいインスタンスを初期化します。
プロパティ
出力形式。
public PdfToXlsOptions.ExcelFormat Format { get; set; }
プロパティの値
PdfToXlsOptions.ExcelFormat
InsertBlankColumnAtFirst
ワークシートの最初の列として空白の列を挿入する必要がある場合は true に設定します。
デフォルト値は false で、空白の列は挿入されません。
public bool InsertBlankColumnAtFirst { get; set; }
プロパティの値
bool
MinimizeTheNumberOfWorksheets
結果のブックのワークシートの数を最小限に抑える必要がある場合は true に設定します。
デフォルト値は false で、各 PDF ページを別々のワークシートとして保存します。
public bool MinimizeTheNumberOfWorksheets { get; set; }
プロパティの値
bool
クラス PluginBaseOptions
public class PluginBaseOptions : IPluginOptions
継承
object ←
PluginBaseOptions
派生
- AddTimestampOptions,
- CompressOptions,
- DecryptionOptions,
- EncryptionOptions,
- HtmlToPdfOptions,
- MergeOptions,
- OptimizeOptions,
- PdfToJpegOptions,
- PdfToPngOptions,
- PdfToTiffOptions,
- ResizeOptions,
- RotateOptions,
- SignOptions,
- SplitOptions,
- TableOptions
実装
継承されたメンバー
プロパティ
操作が完了した後、入力ストリームを閉じます。
public bool CloseInputStreams { get; set; }
プロパティの値
bool
CloseOutputStreams
操作が完了した後、出力ストリームを閉じます。
public bool CloseOutputStreams { get; set; }
プロパティの値
bool
操作のための入力データを返します。
public List<idatasource> Inputs { get; }
プロパティの値
List<IDataSource>
Outputs
操作のための出力データを返します。
public List<idatasource> Outputs { get; }
プロパティの値
List<IDataSource>
メソッド
入力に新しいデータを追加します。
public void AddInput(IDataSource dataSource)
パラメーター
AddOutput(IDataSource)
出力に新しいデータを追加します。
public void AddOutput(IDataSource saveDataSource)
パラメーター
クラス PngConverter
情報
Documentize.PngConverter プラグインを表します。PDF ドキュメントを PNG 形式に変換するために使用されます。
public sealed class PngConverter
継承
object ←
PngConverter
継承メンバー
例
この例は、PDF ドキュメントを PNG 形式に変換する方法を示しています。
// PngConverter を作成
var plugin = new PngConverter();
// 指示を設定するための PdfToPngOptions オブジェクトを作成
var opt = new PdfToPngOptions();
// 入力ファイルパスを追加
opt.AddInput(new FileDataSource(inputPath));
// 出力ファイルパスを設定
opt.AddOutput(new DirectoryDataSource(outputPath));
// プロセスを実行
plugin.Process(opt);
コンストラクタ
PngConverter()
メソッド
Process(PdfToPngOptions)
指定されたパラメータで Documentize.PngConverter の処理を開始します。
public ResultContainer Process(PdfToPngOptions options)
パラメータ
戻り値
ResultContainer : 操作の結果を含む ResultContainer オブジェクトです。
クラス ResizeOptions
情報
Documentize.Optimizer プラグインのリサイズオプションを表します。
public sealed class ResizeOptions : PluginBaseOptions, IPluginOptions
継承
object ←
PluginBaseOptions ←
ResizeOptions
実装
継承メンバー
コンストラクタ
ResizeOptions()
デフォルトオプションで Documentize.ResizeOptions オブジェクトの新しいインスタンスを初期化します。
プロパティ
PageSize
新しいページサイズを取得または設定します。
public PageSize PageSize { get; set; }
プロパティ値
PageSize
クラス ResultContainer
情報
プラグインの処理結果コレクションを含むコンテナを表します。
public class ResultContainer
継承
object ←
ResultContainer
継承されたメンバー
プロパティ
ResultCollection
操作結果のコレクションを取得します
public List<ioperationresult> ResultCollection { get; }
プロパティ値
List<IOperationResult>
クラス SignOptions
情報
Documentize.Signature プラグインの署名オプションを表します。
public sealed class SignOptions : PluginBaseOptions, IPluginOptions
継承関係
object ←
PluginBaseOptions ←
SignOptions
実装
継承メンバー
- PluginBaseOptions.AddInput(IDataSource),
- PluginBaseOptions.AddOutput(IDataSource),
- PluginBaseOptions.Inputs,
- PluginBaseOptions.Outputs,
- PluginBaseOptions.CloseInputStreams,
- PluginBaseOptions.CloseOutputStreams,
- object.GetType(),
- object.ToString(),
- object.Equals(object?),
- object.Equals(object?, object?),
- object.ReferenceEquals(object?, object?),
- object.GetHashCode()
コンストラクタ
SignOptions(string, string)
デフォルトのオプションで Documentize.SignOptions オブジェクトの新しいインスタンスを初期化します。
public SignOptions(string pfx, string password)
パラメータ
SignOptions(Stream, string)
デフォルトのオプションで Documentize.SignOptions オブジェクトの新しいインスタンスを初期化します。
public SignOptions(Stream pfx, string password)
パラメータ
プロパティ
署名の連絡先。
public string Contact { get; set; }
プロパティ値
string
Location
署名の場所。
public string Location { get; set; }
プロパティ値
string
Name
既存の署名フィールドの名前。
新しいフィールドを作成する場合は null。
public string Name { get; set; }
プロパティ値
string
PageNumber
署名が行われるページ番号。
public int PageNumber { get; set; }
プロパティ値
int
Reason
署名の理由。
public string Reason { get; set; }
プロパティ値
string
Rectangle
署名の矩形。
public Rectangle Rectangle { get; set; }
プロパティ値
Rectangle
Visible
署名の可視性。
public bool Visible { get; set; }
プロパティ値
bool
クラス SplitOptions
情報
Documentize.Splitter プラグインのための分割オプションを表します。
public sealed class SplitOptions : PluginBaseOptions, IPluginOptions
継承
object ←
PluginBaseOptions ←
SplitOptions
実装
継承されたメンバー
- PluginBaseOptions.AddInput(IDataSource),
- PluginBaseOptions.AddOutput(IDataSource),
- PluginBaseOptions.Inputs,
- PluginBaseOptions.Outputs,
- PluginBaseOptions.CloseInputStreams,
- PluginBaseOptions.CloseOutputStreams,
- object.GetType(),
- object.ToString(),
- object.Equals(object?),
- object.Equals(object?, object?),
- object.ReferenceEquals(object?, object?),
- object.GetHashCode()
コンストラクタ
SplitOptions()
デフォルトオプションで Documentize.SplitOptions オブジェクトの新しいインスタンスを初期化します。
クラス StreamDataSource
情報
プラグインの読み込みおよび保存操作のためのストリームデータソースを表します。
public sealed class StreamDataSource : IDataSource
継承
object ←
StreamDataSource
実装
継承メンバー
コンストラクター
StreamDataSource(Stream)
指定されたストリームオブジェクトで新しいストリームデータソースを初期化します。
public StreamDataSource(Stream data)
パラメーター
プロパティ
Data
現在のデータソースのストリームオブジェクトを取得します。
public Stream Data { get; }
プロパティ値
Stream
DataType
データソースのタイプ(ストリーム)。
public DataType DataType { get; }
プロパティ値
DataType
クラス StreamResult
public sealed class StreamResult : IOperationResult
継承
object ←
StreamResult
実装
継承メンバー
プロパティ
Data
生データを取得します。
public object Data { get; }
プロパティ値
object
IsFile
結果が出力ファイルへのパスであるかどうかを示します。
public bool IsFile { get; }
プロパティ値
bool
IsStream
結果が出力ファイルへのパスであるかどうかを示します。
public bool IsStream { get; }
プロパティ値
bool
IsString
結果が文字列であるかどうかを示します。
public bool IsString { get; }
プロパティ値
bool
メソッド
ToFile()
結果をファイルに変換しようとします。
戻り値
string : 結果がファイルの場合、出力ファイルへのパスを表す文字列。それ以外は null
。
ToStream()
結果をストリームオブジェクトに変換しようとします。
戻り値
Stream : 結果がストリームの場合、出力データを表すストリームオブジェクト。それ以外は null
。
クラス StringResult
public sealed class StringResult : IOperationResult
継承
object ←
StringResult
実装
継承されたメンバー
プロパティ
Data
生データを取得します。
public object Data { get; }
プロパティ値
object
IsFile
結果が出力ファイルへのパスであるかどうかを示します。
public bool IsFile { get; }
プロパティ値
bool
IsStream
結果が出力ファイルへのパスであるかどうかを示します。
public bool IsStream { get; }
プロパティ値
bool
IsString
結果が文字列であるかどうかを示します。
public bool IsString { get; }
プロパティ値
bool
Text
結果の文字列表現を返します。
public string Text { get; }
プロパティ値
string
メソッド
ToFile()
結果をファイルに変換しようとします。
戻り値
string : 結果がファイルの場合は出力ファイルへのパスを示す文字列。それ以外は null
。
ToStream()
結果をストリームオブジェクトに変換しようとします。
戻り値
Stream : 結果がストリームの場合は出力データを示すストリームオブジェクト。それ以外は null
。
ToString()
結果を文字列に変換しようとします。
public override string ToString()
戻り値
string : 結果が文字列の場合はテキスト内容を示す文字列。それ以外は base.ToString() を返します。
クラス TableCellBuilder
public class TableCellBuilder : TableRowBuilder
継承
object ←
TableBuilder ←
TableRowBuilder ←
TableCellBuilder
継承されたメンバー
- TableRowBuilder.AddCell(),
- TableRowBuilder.AddRow(),
- TableBuilder.AddRow(),
- TableBuilder.AddTable(),
- TableBuilder.InsertPageAfter(int),
- TableBuilder.InsertPageBefore(int),
- object.GetType(),
- object.MemberwiseClone(),
- object.ToString(),
- object.Equals(object?),
- object.Equals(object?, object?),
- object.ReferenceEquals(object?, object?),
- object.GetHashCode()
メソッド
AddCell()
テーブルにセルを追加します。
public override TableCellBuilder AddCell()
戻り値
TableCellBuilder : 現在の Documentize.TableCellBuilder のインスタンス。
AddParagraph(params string[])
テーブルセルに段落を追加します。
public TableCellBuilder AddParagraph(params string[] paragraphs)
パラメーター
paragraphs
string[]: 段落用のテキスト。
戻り値
TableCellBuilder : 現在の Documentize.TableCellBuilder のインスタンス。
クラス TableRowBuilder
public class TableRowBuilder : TableBuilder
継承
object ←
TableBuilder ←
TableRowBuilder
派生
継承されたメンバー
- TableBuilder.AddRow(),
- TableBuilder.AddTable(),
- TableBuilder.InsertPageAfter(int),
- TableBuilder.InsertPageBefore(int),
- object.GetType(),
- object.MemberwiseClone(),
- object.ToString(),
- object.Equals(object?),
- object.Equals(object?, object?),
- object.ReferenceEquals(object?, object?),
- object.GetHashCode()
メソッド
AddCell()
テーブル行にセルを追加します。
public virtual TableCellBuilder AddCell()
戻り値
TableCellBuilder : 作成された Documentize.TableCellBuilder のインスタンス。
AddRow()
AddRow をオーバーライドします。
public override TableRowBuilder AddRow()
戻り値
TableRowBuilder : 現在の Documentize.TableRowBuilder のインスタンス。
情報
Documentize.TextExtractor プラグインのテキスト抽出オプションを表します。
public sealed class TextExtractorOptions : PdfExtractorOptions, IPluginOptions
継承
object ←
PdfExtractorOptions ←
TextExtractorOptions
実装
継承されたメンバー
- PdfExtractorOptions.AddInput(IDataSource),
- PdfExtractorOptions.Inputs,
- PdfExtractorOptions.OperationName,
- object.GetType(),
- object.ToString(),
- object.Equals(object?),
- object.Equals(object?, object?),
- object.ReferenceEquals(object?, object?),
- object.GetHashCode()
例
この例では、PDF ドキュメントのテキストコンテンツを抽出する方法を示します。
// PDF コンテンツを抽出するために TextExtractor オブジェクトを作成
using (TextExtractor extractor = new TextExtractor())
{
// テキストフォーマットモード (Pure または Raw - デフォルト) を設定するために TextExtractorOptions オブジェクトを作成
extractorOptions = new TextExtractorOptions(TextExtractorOptions.TextFormattingMode.Pure);
// データソースに入力ファイルパスを追加
extractorOptions.AddInput(new FileDataSource(inputPath));
// 抽出処理を実行
ResultContainer resultContainer = extractor.Process(extractorOptions);
// ResultContainer オブジェクトから抽出されたテキストを取得
string textExtracted = resultContainer.ResultCollection[0].ToString();
}
備考
Documentize.TextExtractorOptions オブジェクトは、Documentize.TextExtractorOptions.TextFormattingMode およびテキスト抽出操作の他のオプションを設定するために使用されます。
また、入力 PDF ドキュメントを表すデータ (ファイル、ストリーム) を追加する機能を継承しています。
コンストラクタ
指定されたテキストフォーマットモードのために Documentize.TextExtractorOptions オブジェクトの新しいインスタンスを初期化します。
public TextExtractorOptions(TextExtractorOptions.TextFormattingMode formattingMode)
パラメーター
‘Raw’ (デフォルト) テキストフォーマットモードで Documentize.TextExtractorOptions オブジェクトの新しいインスタンスを初期化します。
public TextExtractorOptions()
プロパティ
フォーマットモードを取得します。
public TextExtractorOptions.TextFormattingMode FormattingMode { get; }
プロパティ値
TextExtractorOptions.TextFormattingMode
操作の名前を返します。
public override string OperationName { get; }
プロパティ値
string
クラス TiffConverter
情報
Documentize.TiffConverter プラグインを表します。PDF ドキュメントを TIFF 形式に変換するために使用されます。
public sealed class TiffConverter
継承
object ←
TiffConverter
継承されたメンバー
例
この例は、PDF ドキュメントを TIFF 形式に変換する方法を示します。
// TiffConverter を作成
var plugin = new TiffConverter();
// 指示を設定するために PdfToTiffOptions オブジェクトを作成
var opt = new PdfToTiffOptions();
// 入力ファイルパスを追加
opt.AddInput(new FileDataSource(inputPath));
// 出力ファイルパスを設定
opt.AddOutput(new DirectoryDataSource(outputPath));
// 処理を実行
plugin.Process(opt);
コンストラクター
TiffConverter()
メソッド
Process(PdfToTiffOptions)
指定されたパラメーターで Documentize.TiffConverter 処理を開始します。
public ResultContainer Process(PdfToTiffOptions options)
パラメーター
返す
ResultContainer : 操作の結果を含む ResultContainer オブジェクト。
クラス XlsConverter
情報
Documentize.XlsConverter プラグインを表します。PDF ドキュメントを XLSX/XLS フォーマットに変換するために使用されます。
public sealed class XlsConverter
継承
object ←
XlsConverter
継承メンバー
例
この例は、PDF を XLSX ドキュメントに変換する方法を示しています。
// XlsConverter を作成
var plugin = new XlsConverter();
// PdfToXlsOptions を作成
var opt = new PdfToXlsOptions();
// 入力ファイルのパスを追加
opt.AddInput(new FileDataSource(inputPath));
// 出力ファイルのパスを設定
opt.AddOutput(new FileDataSource(outputPath));
// プロセスを実行
plugin.Process(opt);
コンストラクタ
XlsConverter()
メソッド
Process(PdfToXlsOptions)
指定されたパラメーターで Documentize.XlsConverter の処理を開始します。
public ResultContainer Process(PdfToXlsOptions options)
パラメーター
戻り値
ResultContainer: 操作の結果を含む Documentize.ResultContainer オブジェクトです。
クラス テーブルオプション
情報
Documentize.TableGenerator プラグインによるドキュメントへのテーブル追加オプションを表します。
public sealed class TableOptions : PluginBaseOptions, IPluginOptions
継承
object ←
PluginBaseOptions ←
TableOptions
実装
継承メンバー
- PluginBaseOptions.AddInput(IDataSource),
- PluginBaseOptions.AddOutput(IDataSource),
- PluginBaseOptions.Inputs,
- PluginBaseOptions.Outputs,
- PluginBaseOptions.CloseInputStreams,
- PluginBaseOptions.CloseOutputStreams,
- object.GetType(),
- object.ToString(),
- object.Equals(object?),
- object.Equals(object?, object?),
- object.ReferenceEquals(object?, object?),
- object.GetHashCode()
コンストラクター
TableOptions()
デフォルトオプションで Documentize.TableOptions オブジェクトの新しいインスタンスを初期化します。
メソッド
AddTable()
ドキュメントにテーブルを追加します。
public TableBuilder AddTable()
戻り値
TableBuilder : Documentize.TableBuilder の新しいインスタンス。
Create()
Documentize.TableOptions のインスタンスを作成します。
public static TableOptions Create()
戻り値
TableOptions : Documentize.TableOptions の新しいインスタンス。
InsertPageAfter(int)
指定したページの後にページを挿入します。
public TableOptions InsertPageAfter(int page)
パラメーター
page
int: テーブルを挿入するページ番号。
戻り値
TableOptions : 現在の Documentize.TableOptions のインスタンス。
InsertPageBefore(int)
指定したページの前にページを挿入します。
public TableOptions InsertPageBefore(int page)
パラメーター
page
int: テーブルを挿入するページ番号。
戻り値
TableOptions : 現在の Documentize.TableOptions のインスタンス。
クラス テーブルジェネレーター
情報
Documentize.TableGenerator プラグインを表します。PDF ドキュメントにテーブルを追加するために使用されます。
public sealed class TableGenerator
継承
object ←
TableGenerator
継承メンバー
例
この例は、PDF ファイルにテーブルを追加する方法を示しています。
// テーブルジェネレーターを作成
var plugin = new TableGenerator();
// 指示を設定するために TableOptions オブジェクトを作成
TableOptions opt = new TableOptions().InsertPageBefore(1)
.AddTable()
.AddRow()
.AddCell().AddParagraph("名前")
.AddCell().AddParagraph("年齢")
.AddRow()
.AddCell().AddParagraph("ボブ")
.AddCell().AddParagraph("12")
.AddRow()
.AddCell().AddParagraph("サム")
.AddCell().AddParagraph("20")
.AddRow()
.AddCell().AddParagraph("サンディ")
.AddCell().AddParagraph("26")
.AddRow()
.AddCell().AddParagraph("トム")
.AddCell().AddParagraph("12")
.AddRow()
.AddCell().AddParagraph("ジム")
.AddCell().AddParagraph("27");
// 入力ファイルパスを追加
opt.AddInput(new FileDataSource(inputPath1));
// 出力ファイルパスを設定
opt.AddOutput(new FileDataSource(outputPath));
// 処理を実行
plugin.Process(opt);
コンストラクタ
TableGenerator()
メソッド
Process(TableOptions)
指定されたパラメータで Documentize.TableGenerator 処理を開始します。
public ResultContainer Process(TableOptions options)
パラメータ
options
TableOptions: Documentize.TableGenerator に対する指示を含むオプションオブジェクト。
戻り値
ResultContainer : 操作の結果を含む ResultContainer オブジェクト。
クラス テーブルビルダー
情報
クラスはPDFページのテーブルのビルダーを表します。
public class TableBuilder
継承
object ←
TableBuilder
派生
継承メンバー
メソッド
AddRow()
テーブルに新しい行を追加します。
public virtual TableRowBuilder AddRow()
戻り値
TableRowBuilder : 現在の Documentize.TableRowBuilder のインスタンス。
AddTable()
ドキュメントに新しいテーブルを追加します。
public TableBuilder AddTable()
戻り値
TableBuilder : 現在の Documentize.TableBuilder のインスタンス。
InsertPageAfter(int)
指定したページの後にページを挿入します。
public TableOptions InsertPageAfter(int page)
パラメータ
page
int: テーブルを挿入するページ番号。
戻り値
TableOptions : 現在の Documentize.TableOptions のインスタンス。
InsertPageBefore(int)
指定したページの前にページを挿入します。
public TableOptions InsertPageBefore(int page)
パラメータ
page
int: テーブルを挿入するページ番号。
戻り値
TableOptions : 現在の Documentize.TableOptions のインスタンス。
演算子
implicit operator TableOptions(TableBuilder)
ビルダー Documentize.TableBuilder をオプション Documentize.TableOptions に変換します。
public static implicit operator TableOptions(TableBuilder builder)
パラメータ
戻り値
TableOptions : PdfGeneratorTableOptions への変換の結果です。
クラス ページサイズ
継承
object ←
PageSize
派生
継承されたメンバー
コンストラクタ
PageSize()
Documentize.PageSizeのコンストラクタ。デフォルトはA4サイズです。
PageSize(double, double)
Documentize.PageSizeのコンストラクタ。
public PageSize(double width, double height)
パラメーター
プロパティ
A0
A0サイズ (1189x840 mm)。
public static PageSize A0 { get; }
プロパティ値
PageSize
A1
A1サイズ (840x594 mm)。
public static PageSize A1 { get; }
プロパティ値
PageSize
A2
A2サイズ (594x420 mm)。
public static PageSize A2 { get; }
プロパティ値
PageSize
A3
A3サイズ (420x297 mm)。
public static PageSize A3 { get; }
プロパティ値
PageSize
A4
A4サイズ (297x210 mm)。
public static PageSize A4 { get; }
プロパティ値
PageSize
A5
A5サイズ (210x148 mm)。
public static PageSize A5 { get; }
プロパティ値
PageSize
A6
A6サイズ (148x105 mm)。
public static PageSize A6 { get; }
プロパティ値
PageSize
B5
B5サイズ (250x176 mm)。
public static PageSize B5 { get; }
プロパティ値
PageSize
Height
ページの高さを取得または設定します。
public double Height { get; set; }
プロパティ値
double
IsLandscape
ページの向きを取得します。横向きの場合はtrueを、縦向きの場合はfalseを返します。
public bool IsLandscape { get; }
プロパティ値
bool
P11x17
11x17インチ形式。
public static PageSize P11x17 { get; }
プロパティ値
PageSize
PageLedger
レジャーサイズ (432x279 mm)。
public static PageSize PageLedger { get; }
プロパティ値
PageSize
PageLegal
リーガルサイズ (356x216 mm)。
public static PageSize PageLegal { get; }
プロパティ値
PageSize
PageLetter
レターサイズ (279x216 mm)。
public static PageSize PageLetter { get; }
プロパティ値
PageSize
Width
ページの幅を取得または設定します。
public double Width { get; set; }
プロパティ値
double
クラス ページ情報
public class PageInfo : PageSize
継承
object ←
PageSize ←
PageInfo
継承されたメンバー
- PageSize.Width,
- PageSize.Height,
- PageSize.IsLandscape,
- PageSize.A0,
- PageSize.A1,
- PageSize.A2,
- PageSize.A3,
- PageSize.A4,
- PageSize.A5,
- PageSize.A6,
- PageSize.B5,
- PageSize.PageLetter,
- PageSize.PageLegal,
- PageSize.PageLedger,
- PageSize.P11x17,
- object.GetType(),
- object.MemberwiseClone(),
- object.ToString(),
- object.Equals(object?),
- object.Equals(object?, object?),
- object.ReferenceEquals(object?, object?),
- object.GetHashCode()
コンストラクター
PageInfo()
Documentize.PageInfo のコンストラクター。
PageInfo(double, double)
Documentize.PageInfo のコンストラクター。
public PageInfo(double width, double height)
パラメーター
プロパティ
MarginBottom
下部余白を示す値を取得または設定します。
public double MarginBottom { get; set; }
プロパティ値
double
MarginLeft
左余白を示す値を取得または設定します。
public double MarginLeft { get; set; }
プロパティ値
double
MarginRight
右余白を示す値を取得または設定します。
public double MarginRight { get; set; }
プロパティ値
double
MarginTop
上部余白を示す値を取得または設定します。
public double MarginTop { get; set; }
プロパティ値
double
クラス オプティマイザー
情報
Documentize.Optimizer プラグインを表します。
public sealed class Optimizer
継承
object ←
Optimizer
継承メンバー
例
この例は PDF ドキュメントを最適化する方法を示しています。
// Optimizer を作成
var plugin = new Optimizer();
// 指示を設定するための OptimizeOptions オブジェクトを作成
var opt = new OptimizeOptions();
// 入力ファイルパスを追加
opt.AddInput(new FileDataSource(inputPath));
// 出力ファイルパスを設定
opt.AddOutput(new FileDataSource(outputPath));
// 処理を実行
plugin.Process(opt);
コンストラクター
Optimizer()
メソッド
Process(OptimizeOptions)
指定されたパラメーターで Documentize.Optimizer 処理を開始します。
public ResultContainer Process(OptimizeOptions options)
パラメーター
戻り値
ResultContainer : 操作の結果を含む ResultContainer オブジェクト。
Process(RotateOptions)
指定されたパラメーターで Documentize.Optimizer 処理を開始します。
public ResultContainer Process(RotateOptions options)
パラメーター
options
RotateOptions: Documentize.RotateOptions に対する指示を含むオプションオブジェクト。
戻り値
ResultContainer : 操作の結果を含む ResultContainer オブジェクト。
Process(ResizeOptions)
指定されたパラメーターで Documentize.Optimizer 処理を開始します。
public ResultContainer Process(ResizeOptions options)
パラメーター
options
ResizeOptions: Documentize.ResizeOptions に対する指示を含むオプションオブジェクト。
戻り値
ResultContainer : 操作の結果を含む ResultContainer オブジェクト。
Process(CompressOptions)
指定されたパラメーターで Documentize.Optimizer 処理を開始します。
public ResultContainer Process(CompressOptions options)
パラメーター
戻り値
ResultContainer : 操作の結果を含む ResultContainer オブジェクト。
クラス セキュリティ
情報
Documentize.Security プラグインを表します。
public sealed class Security
継承
object ←
Security
継承したメンバー
例
この例は、PDF ドキュメントを暗号化する方法を示しています。
// Security を作成
var plugin = new Security();
// 指示を設定するために EncryptionOptions オブジェクトを作成
var opt = new EncryptionOptions("123456", "qwerty");
// 入力ファイルパスを追加
opt.AddInput(new FileDataSource(inputPath));
// 出力ファイルパスを設定
opt.AddOutput(new FileDataSource(outputPath));
// 処理を実行
plugin.Process(opt);
この例は、PDF ドキュメントを復号化する方法を示しています。
// Security を作成
var plugin = new Security();
// 指示を設定するために DecryptionOptions オブジェクトを作成
var opt = new DecryptionOptions("123456"));
// 入力ファイルパスを追加
opt.AddInput(new FileDataSource(inputPath));
// 出力ファイルパスを設定
opt.AddOutput(new FileDataSource(outputPath));
// 処理を実行
plugin.Process(opt);
コンストラクター
Security()
メソッド
Process(IPluginOptions)
指定されたパラメーターで Documentize.Security 処理を開始します。
public ResultContainer Process(IPluginOptions options)
パラメーター
戻り値
ResultContainer : 操作の結果を含む ResultContainer オブジェクトです。
例外
InvalidOperationException
クラス タイムスタンプ
情報
Documentize.Timestamp プラグインを表します。
継承
object ←
Timestamp
継承されたメンバー
例
この例では、ドキュメントにタイムスタンプを追加する方法を示します。
// タイムスタンプを作成
var plugin = new Timestamp();
// 指示を設定するための AddTimestampOptions オブジェクトを作成
var opt = new AddTimestampOptions("path_to_pfx", "password_for_pfx", "timestamp_server_url");
// 入力ファイルパスを追加
opt.AddInput(new FileDataSource("path_to_pdf"));
// 出力ファイルパスを設定
opt.AddOutput(new FileDataSource("path_to_result_pdf"));
// 処理を実行
plugin.Process(opt);
コンストラクター
Timestamp()
メソッド
Process(AddTimestampOptions)
指定されたパラメーターで Documentize.Timestamp 処理を開始します。
public ResultContainer Process(AddTimestampOptions options)
パラメーター
戻り値
ResultContainer : 操作の結果を含む ResultContainer オブジェクトです。
クラス ディレクトリデータソース
情報
プラグインのロードおよび保存操作のためのディレクトリデータを表します。
public sealed class DirectoryDataSource : IDataSource
継承
object ←
DirectoryDataSource
実装
継承メンバー
コンストラクター
DirectoryDataSource(string)
指定されたパスを使用して新しいディレクトリデータを初期化します。
public DirectoryDataSource(string path)
パラメーター
path
string: ディレクトリへのパスを表す文字列。
プロパティ
DataType
データソースの種類。
public DataType DataType { get; }
プロパティ値
DataType
Path
現在のデータのディレクトリへのパスを取得します。
public string Path { get; }
プロパティ値
string
クラス テキストエクストラクター
情報
Documentize.TextExtractor プラグインを表します。PDF ドキュメントからテキストを抽出するために使用されます。
public class TextExtractor : PdfExtractor, IDisposable
継承
object ←
PdfExtractor ←
TextExtractor
実装
継承メンバー
- PdfExtractor.Process(IPluginOptions),
- PdfExtractor.Dispose(),
- object.GetType(),
- object.MemberwiseClone(),
- object.ToString(),
- object.Equals(object?),
- object.Equals(object?, object?),
- object.ReferenceEquals(object?, object?),
- object.GetHashCode()
例
この例は、PDF ドキュメントのテキストコンテンツを抽出する方法を示しています。
// create TextExtractor object to extract text in PDF contents
using (var plugin = new TextExtractor())
{
// create TextExtractorOptions
var opt = new TextExtractorOptions();
// add input file path
opt.AddInput(new FileDataSource(inputPath));
// perform extraction process
var resultContainer = plugin.Process(opt);
// get the extracted text from the ResultContainer object
var textExtracted = resultContainer.ResultCollection[0].ToString();
}
コンストラクター
クラス 回転オプション
情報
Documentize.Optimizerプラグインの回転オプションを表します。
public sealed class RotateOptions : PluginBaseOptions, IPluginOptions
継承
object ←
PluginBaseOptions ←
RotateOptions
実装
継承されたメンバー
- PluginBaseOptions.AddInput(IDataSource),
- PluginBaseOptions.AddOutput(IDataSource),
- PluginBaseOptions.Inputs,
- PluginBaseOptions.Outputs,
- PluginBaseOptions.CloseInputStreams,
- PluginBaseOptions.CloseOutputStreams,
- object.GetType(),
- object.ToString(),
- object.Equals(object?),
- object.Equals(object?, object?),
- object.ReferenceEquals(object?, object?),
- object.GetHashCode()
コンストラクタ
RotateOptions()
デフォルトオプションでDocumentize.RotateOptionsオブジェクトの新しいインスタンスを初期化します。
プロパティ
Rotation
新しいページの回転を取得または設定します。
public Rotation Rotation { get; set; }
プロパティ値
Rotation
クラスシグネチャ
情報
Documentize.Signatureプラグインを表します。
public sealed class Signature
継承
object ←
Signature
継承したメンバー
例
この例は、PDFドキュメントに署名する方法を示しています。
// Signatureを作成
var plugin = new Signature();
// 指示を設定するためのSignOptionsオブジェクトを作成
var opt = new SignOptions(inputPfx, inputPfxPassword);
// 入力ファイルパスを追加
opt.AddInput(new FileDataSource(inputPath));
// 出力ファイルパスを設定
opt.AddOutput(new FileDataSource(outputPath));
// プロセスを実行
plugin.Process(opt);
コンストラクター
Signature()
メソッド
Process(IPluginOptions)
指定されたパラメータでDocumentize.Signature処理を開始します。
public ResultContainer Process(IPluginOptions options)
パラメーター
戻り値
ResultContainer : 操作の結果を含むResultContainerオブジェクトです。
例外
InvalidOperationException
クラスセパレーター
情報
Documentize.Splitterプラグインを表します。文書を個別のページに分割するために使用されます。
継承
object ←
Splitter
継承されたメンバー
例
この例では、PDF文書を分割する方法を示します。
// Splitterを作成
var plugin = new Splitter();
// 指示を設定するためのSplitOptionsオブジェクトを作成
var opt = new SplitOptions();
// 入力ファイルパスを追加
opt.AddInput(new FileDataSource(inputPath));
// 出力ファイルパスを設定
opt.AddOutput(new FileDataSource(outputPath1));
opt.AddOutput(new FileDataSource(outputPath2));
// 処理を実行
plugin.Process(opt);
コンストラクター
Splitter()
メソッド
Process(IPluginOptions)
指定されたパラメータでDocumentize.Splitterの処理を開始します。
public ResultContainer Process(IPluginOptions options)
パラメーター
返り値
ResultContainer : 操作の結果を含むResultContainerオブジェクト。
例外
InvalidOperationException
クラスのマージ
情報
Documentize.Mergerプラグインを表します。複数のPDFドキュメントを1つのPDFにマージするために使用されます。
public sealed class Merger
継承
object ←
Merger
継承メンバー
例
この例は、2つのPDFドキュメントをマージする方法を示しています。
// create Merger
var plugin = new Merger();
// create MergeOptions object to set instructions
var opt = new MergeOptions();
// add input file paths
opt.AddInput(new FileDataSource(inputPath1));
opt.AddInput(new FileDataSource(inputPath2));
// set output file path
opt.AddOutput(new FileDataSource(outputPath));
// perform the process
plugin.Process(opt);
コンストラクタ
Merger()
メソッド
Process(MergeOptions)
指定されたパラメータでDocumentize.Mergerの処理を開始します。
public ResultContainer Process(MergeOptions options)
パラメータ
戻り値
ResultContainer : 操作の結果を含むDocumentize.ResultContainerオブジェクトです。
クラスメッセージ
継承
object ←
Message
継承されたメンバー
コンストラクタ
Message()
プロパティ
Content
メッセージの内容。
[JsonProperty("content")]
public string Content { get; set; }
プロパティ値
string
Role
このメッセージの著者の役割を設定または取得します。
[JsonProperty("role")]
[JsonConverter(typeof(StringEnumConverter), new object[] { true })]
public Role Role { get; set; }
プロパティ値
Role
クラスライセンス
public static class License
継承
object ←
License
継承されたメンバー
例
ライセンスをアクティブにする方法を示します。
// ライセンスを設定
License.Set("PathToLicense.lic");
メソッド
Set(string)
コンポーネントにライセンスを付与します。
public static void Set(string licenseName)
パラメータ
licenseName
string: フルファイル名またはショートファイル名が使用できます。空の文字列を使用すると評価モードに切り替わります。
クラス矩形
継承
object ←
Rectangle
継承メンバー
コンストラクタ
Rectangle(double, double, double, double)
矩形のコンストラクタです。
public Rectangle(double llx, double lly, double urx, double ury)
パラメータ
クラス情報
情報
クラスは現在の製品ビルドに関する情報を提供します。
継承
object ←
Info
継承されたメンバー
フィールド
AssemblyVersion アセンブリバージョン。
フィールド値
string
製品
製品名。
public const string Product = "Documentize"
フィールド値
string
列挙データ型
情報
プラグイン処理のためのデータの可能なタイプを表します。
フィールド
Directory = 2
: データ型は、パスによって表されるディレクトリです。File = 0
: データ型は、パスによって表されるファイルです。Stream = 1
: データ型は、ストリームです。
列挙型の回転
フィールド
None = 0
: 非回転。On180 = 2
: 180度回転。On270 = 3
: 270度時計回りに回転。On360 = 4
: 360度時計回りに回転。On90 = 1
: 90度時計回りに回転。
列挙型の役割
フィールド
Assistant = 2
System = 1
User = 0