Class TableGenerator
情報
Documentize.TableGeneratorプラグインを表します。PDF文書にテーブルを追加するために使用されます。
public sealed class TableGenerator
継承
継承メンバー
- object.GetType(),
- object.ToString(),
- object.Equals(object?),
- object.Equals(object?, object?),
- object.ReferenceEquals(object?, object?),
- object.GetHashCode()
例
この例は、PDFファイルにテーブルを追加する方法を示しています。
// TableGeneratorを初期化
var plugin = new TableGenerator();
// テーブルオプションを設定
var options = 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");
// 入力ファイルパスを追加
options.AddInput(new FileDataSource("path_to_input.pdf"));
// 出力ファイルパスを設定
options.AddOutput(new FileDataSource("path_to_output.pdf"));
// プロセスを実行
plugin.Process(options);
コンストラクタ
TableGenerator()
public TableGenerator()
メソッド
Process(TableOptions)
PDF文書にテーブルを追加します。
public ResultContainer Process(TableOptions options)
パラメーター
options
TableOptions: 操作の指示を含むオプションオブジェクト。
戻り値
ResultContainer : 操作の結果を含むオブジェクト。
例外
オプションが設定されていない場合。
名前空間: Documentize アセンブリ: Documentize.dll