Class TableGenerator

情報

Documentize.TableGeneratorプラグインを表します。PDFドキュメントにテーブルを追加するために使用されます。

[Obsolete("PdfManagerクラスを使用してください。このクラスはすぐに削除されます。")]
public static class TableGenerator

継承

objectTableGenerator

継承されたメンバー

この例では、PDFファイルにテーブルを追加する方法を示します。

// テーブルオプションの構成
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"));
// プロセスを実行
TableGenerator.Process(options);

メソッド

Process(TableOptions)

PDFドキュメントにテーブルを追加します。

public static ResultContainer Process(TableOptions options)

パラメータ

  • options TableOptions: 操作の指示を含むオプションオブジェクトです。

戻り値

ResultContainer : 操作の結果を含むオブジェクトです。

例外

ArgumentException

オプションが設定されていない場合。

名前空間: Documentize アセンブリ: Documentize.dll

 日本語