> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# DocumentDefinition オブジェクト（IDocumentDefinition インターフェイス）

このオブジェクトは Document Definition に対応します。*Document Definition* は、ドキュメント要素の位置を記述し、データ抽出に使用する field を指定するものです。

Document Definition は、ABBYY FlexiCapture 12 プロジェクトの一部として取得できるほか、[**DocumentDefinitions**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/documentdefinitions.md) オブジェクトの [**AddNew**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/documentdefinitions-addnew.md) メソッドを呼び出してプロジェクト内に作成することもできます。

Document Definition は任意の数のセクション (**Sections** プロパティ) で構成でき、各セクションには 1 つまたは複数のページを含めることができます。複数ページにわたって続くブロックや繰り返し出現するブロックがある場合、または次のページに続くテーブルがある場合は、それらのページを 1 つのセクションにまとめます。Document Definition のすべてのページには、**Pages** プロパティからアクセスできます。

**DocumentDefinition** オブジェクトは、補助インターフェイス [**IFieldDefinition**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/fielddefinition.md) をサポートしています。Document Definition 全体は、その Document Definition に含まれるすべての field 定義を保持する最上位の field 定義と見なすことができます。このインターフェイスをサポートしているため、**DocumentDefinition** オブジェクトを **FieldDefinition** オブジェクトとして扱うことができます。

## Properties

<table width="100%">
  <thead>
    <tr>
      <th>
        **名前**
      </th>

      <th>
        **型**
      </th>

      <th>
        **説明**
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        **BarcodeBaseRecognitionParams**
      </td>

      <td>
        [**BarcodeBaseRecognitionParams**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/barcodebaserecognitionparams.md)

        、[読み取り専用](https://docs.abbyy.com/ja/flexi-capture/sdk/guided-tour/properties.md#readonly-properties)
      </td>

      <td>
        Document Definition が一致済みの場合の、バーコード事前認識のパラメーターへのアクセスを提供します。

        なお、ABBYY FlexiLayout Studio で作成した flexible 記述をロードしている場合は、代わりにその設定が使用されます。セクション定義レベルで flexible 記述の設定を上書きするには、&#x20;

        [**ISectionDefinition::UseOwnRecognitionParams**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/sectiondefinition.md#useownrecognitionparams)

        &#x20;

        プロパティに TRUE を割り当てます。
      </td>
    </tr>

    <tr>
      <td>
        **CustomLanguages**
      </td>

      <td>
        **CustomLanguages**、[読み取り専用](https://docs.abbyy.com/ja/flexi-capture/sdk/guided-tour/properties.md#readonly-properties)
      </td>

      <td>
        Document Definition で指定されたユーザー定義のカスタム言語のコレクションを返します。
      </td>
    </tr>

    <tr>
      <td>
        **DataSets**
      </td>

      <td>
        [**DataSets**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/datasets.md)

        , [読み取り専用](https://docs.abbyy.com/ja/flexi-capture/sdk/guided-tour/properties.md#readonly-properties)
      </td>

      <td>
        Document Definition にアタッチされているデータセットのコレクションを返します。データセットは、次の情報を格納するために使用されます。

        <ul>
          <li>ベンダーおよび事業部門に関する情報 (請求書プロジェクトの場合) </li>
          <li>文書定義のセクションのバリエーションに関する情報 (それらのセクションの field の学習に使用) </li>
          <li>ルールによるチェックに必要なさまざまな情報</li>
        </ul>
      </td>
    </tr>

    <tr>
      <td>
        **DefaultLanguage**
      </td>

      <td>
        [**Language**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/language.md)
      </td>

      <td>
        認識時に使用する言語を指定します。言語は個々の field ごとに変更できます (&#x20;

        [**ITextRecognitionParams::Language**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/textrecognitionparams.md#language)

        を参照) が、デフォルトではこのプロパティで指定した言語が使用されます。詳細については、[認識言語の設定](https://docs.abbyy.com/ja/flexi-capture/sdk/guided-tour/settinguprecognitionlanguages.md)を
        参照してください。

        **注:**&#x20;

        <ul>
          <li>
            このプロパティは定数オブジェクトを返します。プロパティの値を変更するには、まず中間の Language オブジェクトを取得して必要なパラメーターを変更し、その
            オブジェクトをプロパティに割り当てる必要があります。
          </li>

          <li>
            このプロパティは、請求書以外のプロジェクトでのみ有効です。請求書プロジェクトの言語設定は、&#x20;

            [**InvoiceSettings**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/invoicesettings.md)

            &#x20;

            オブジェクトの&#x20;

            [**InvoiceLanguages**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/invoicesettings.md)

            &#x20;

            プロパティで設定します。
          </li>
        </ul>
      </td>
    </tr>

    <tr>
      <td>
        **DefaultTextType**
      </td>

      <td>
        [**TextTypeEnum**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/texttypeenum.md)
      </td>

      <td>
        テキストタイプを指定します。テキストタイプは個々のテキストブロックごとに変更できますが (&#x20;

        [**ITextRecognitionParams::TextType**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/textrecognitionparams.md#texttype)

        を参照) 、デフォルトではこのプロパティで指定したテキストタイプが使用されます。
      </td>
    </tr>

    <tr>
      <td>
        **DefaultWritingStyle**
      </td>

      <td>
        [**LanguageIdEnum**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/languageidenum.md)
      </td>

      <td>
        手書き文字の書き方のスタイルを指定します。書き方のスタイルは field ごとに個別に変更できますが (&#x20;

        [**ITextRecognitionParams::WritingStyle**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/textrecognitionparams.md#writingstyle)

        を参照) 、デフォルトではこのプロパティで指定したスタイルが使用されます。

        <details>
          <summary>数字の書き方のスタイルの例</summary>

          <table width="100%">
            <tbody>
              <tr>
                <td>
                  ![](https://mintcdn.com/abbyy/DUHPkwoM_QL6XAR5/images/flexi-capture/sdk/WritingStyle_6.gif?s=9d5568e181a623dd63c850c50210f718)
                </td>

                <td>
                  – ドイツ式の 1
                </td>
              </tr>

              <tr>
                <td>
                  ![](https://mintcdn.com/abbyy/DUHPkwoM_QL6XAR5/images/flexi-capture/sdk/WritingStyle_5.gif?s=20881d31f178b149b356573c15c7a201)
                </td>

                <td>
                  – ロシア式の 1
                </td>
              </tr>

              <tr>
                <td>
                  ![](https://mintcdn.com/abbyy/DUHPkwoM_QL6XAR5/images/flexi-capture/sdk/WritingStyle_2.gif?s=6720b71d4701b808714ce8460ddd87d7)
                </td>

                <td>
                  – アメリカ式の 2
                </td>
              </tr>

              <tr>
                <td>
                  ![](https://mintcdn.com/abbyy/DUHPkwoM_QL6XAR5/images/flexi-capture/sdk/WritingStyle_1.gif?s=86c1e8c11cfd8885c49d82574e6d2915)
                </td>

                <td>
                  – ロシア式の 2
                </td>
              </tr>

              <tr>
                <td>
                  ![](https://mintcdn.com/abbyy/DUHPkwoM_QL6XAR5/images/flexi-capture/sdk/WritingStyle_3.gif?s=74d459b1adcff082a2f07021ed93e1bd)
                </td>

                <td>
                  – 「一般的な」5。どのスタイルにも見られます
                </td>
              </tr>

              <tr>
                <td>
                  ![](https://mintcdn.com/abbyy/DUHPkwoM_QL6XAR5/images/flexi-capture/sdk/WritingStyle_4.gif?s=bb7e6237bf9fbefa46f5864e3f99b6b6)
                </td>

                <td>
                  – 日本式の 5
                </td>
              </tr>

              <tr>
                <td>
                  ![](https://mintcdn.com/abbyy/DUHPkwoM_QL6XAR5/images/flexi-capture/sdk/WritingStyle_7.gif?s=fe4d29abe5d7928223991e663e7d6c8f)
                </td>

                <td>
                  – 「一般的な」9。どのスタイルにも見られます
                </td>
              </tr>

              <tr>
                <td>
                  ![](https://mintcdn.com/abbyy/DUHPkwoM_QL6XAR5/images/flexi-capture/sdk/WritingStyle_8.gif?s=9d3eb48b232b11eeac2599273011fc97)
                </td>

                <td>
                  – 右側に輪があるチェコ式の 9
                </td>
              </tr>

              <tr>
                <td>
                  ![](https://mintcdn.com/abbyy/DUHPkwoM_QL6XAR5/images/flexi-capture/sdk/WritingStyle_9.gif?s=cdda3c451027a395bbd8ee974826e516)
                </td>

                <td>
                  – 下部に「フック」がないアメリカ式の 9
                </td>
              </tr>
            </tbody>
          </table>
        </details>
      </td>
    </tr>

    <tr>
      <td>
        **Description**
      </td>

      <td>
        [**String**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/propertiestypes.md)
      </td>

      <td>
        Document Definition の説明テキストを返します。
      </td>
    </tr>

    <tr>
      <td>
        **Errors**
      </td>

      <td>
        [**StringsCollection**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/stringscollection.md)

        、[読み取り専用](https://docs.abbyy.com/ja/flexi-capture/sdk/guided-tour/properties.md#readonly-properties)
      </td>

      <td>
        直近の&#x20;

        [**Check**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/documentdefinition-check.md)

        &#x20;

        メソッド呼び出しで発生したエラーの説明のコレクションを返します。含まれるのは全般的なエラーのみです。Document Definition の特定のセクションのエラーを取得するには、&#x20;

        [**ISectionDefinition::Errors**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/sectiondefinition.md#errors)

        &#x20;

        プロパティを使用してください。
      </td>
    </tr>

    <tr>
      <td>
        **ExportProfiles**
      </td>

      <td>
        [**ExportProfiles**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/exportprofiles.md)

        , [読み取り専用](https://docs.abbyy.com/ja/flexi-capture/sdk/guided-tour/properties.md#readonly-properties)
      </td>

      <td>
        エクスポートパラメーターのコレクションにアクセスできます。
      </td>
    </tr>

    <tr>
      <td>
        **GUID**
      </td>

      <td>
        [**String**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/propertiestypes.md)

        、読み取り専用
      </td>

      <td>
        Document Definition のグローバル一意識別子 (GUID) を返します。
      </td>
    </tr>

    <tr>
      <td>
        **Id**
      </td>

      <td>
        [**Integer**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/propertiestypes.md)

        、読み取り専用
      </td>

      <td>
        Document Definition の識別子を返します。この識別子はプロジェクト内で一意です。
      </td>
    </tr>

    <tr>
      <td>
        **InvoiceSettings**
      </td>

      <td>
        [**InvoiceSettings**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/invoicesettings.md)

        、[読み取り専用](https://docs.abbyy.com/ja/flexi-capture/sdk/guided-tour/properties.md#readonly-properties)
      </td>

      <td>
        請求書用 Document Definition の設定です。

        このプロパティを使用するには、まず&#x20;

        [**DocumentDefinitions**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/documentdefinitions.md)

        &#x20;

        オブジェクトの&#x20;

        [**CheckOut**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/documentdefinitions-checkout.md)

        &#x20;

        メソッドで Document Definition をチェックアウトしてください。
      </td>
    </tr>

    <tr>
      <td>
        **IsEnabled**
      </td>

      <td>
        [**ブール型**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/propertiestypes.md)
      </td>

      <td>
        Document Definition を文書処理に使用するかどうかを指定します。このプロパティを FALSE に設定すると、その Document Definition は文書処理の対象から除外されます。
      </td>
    </tr>

    <tr>
      <td>
        **IsValid**
      </td>

      <td>
        [**ブール型**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/propertiestypes.md)

        、読み取り専用
      </td>

      <td>
        Document Definition が有効かどうかを示します。Document Definition にエラーがなく、最後に **Check**&#x20;
        メソッドを呼び出してから変更されていなければ、Document Definition は有効です。
      </td>
    </tr>

    <tr>
      <td>
        **LicenseInfo**
      </td>

      <td>
        [**String**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/propertiestypes.md)

        、読み取り専用
      </td>

      <td>
        Document Definition の著者に関する情報 (著作権など) を指定します。
      </td>
    </tr>

    <tr>
      <td>
        **Name**
      </td>

      <td>
        [**String**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/propertiestypes.md)
      </td>

      <td>
        Document Definition の名前を格納します。

        **注:** Document Definition が編集モードの間 (つまり、&#x20;

        [**CheckOut**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/documentdefinitions-checkout.md)

        &#x20;

        メソッドを呼び出してから、&#x20;

        [**CheckIn**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/documentdefinitions-checkin.md)

        &#x20;

        または&#x20;

        [**UndoCheckout**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/documentdefinitions-undocheckout.md)

        &#x20;

        メソッドで変更を保存または破棄するまでの間) は、このプロパティを変更できません。
      </td>
    </tr>

    <tr>
      <td>
        **PageAnalysisParams**
      </td>

      <td>
        [**PageAnalysisParams**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/pageanalysisparams.md)
      </td>

      <td>
        ページ解析のパラメーターを指定します。ページ解析 (向きの検出、画像の拡大など) は、Document Definition を正しく適用するために、Document
        Definition の適用時に実行されます。

        **注:** このプロパティは定数オブジェクトを返します。プロパティの値を変更するには、まず&#x20;

        [**IEngine::CreatePageAnalysisParams**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/engine-createxxx.md)

        &#x20;

        メソッドを使用して中間の&#x20;

        [**PageAnalysisParams**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/pageanalysisparams.md)

        &#x20;

        オブジェクトを取得し、必要なパラメーターを変更してから、そのオブジェクトをプロパティに割り当てる必要があります。
      </td>
    </tr>

    <tr>
      <td>
        **Pages**
      </td>

      <td>
        [**PageDefinitions**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/pagedefinitions.md)

        、[読み取り専用](https://docs.abbyy.com/ja/flexi-capture/sdk/guided-tour/properties.md#readonly-properties)
      </td>

      <td>
        Document Definition のページのコレクションを返します。
      </td>
    </tr>

    <tr>
      <td>
        **Sections**
      </td>

      <td>
        [**SectionDefinitions**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/sectiondefinitions.md)

        、[読み取り専用](https://docs.abbyy.com/ja/flexi-capture/sdk/guided-tour/properties.md#readonly-properties)
      </td>

      <td>
        Document Definition のセクションを返します。Document Definition のセクションとは、複数のページ (または単一のページ) とそれらのページ上の field から成るセットで、文書の中で論理的に完結した部分に相当します。

        ドキュメントセットを扱う場合、セクションを別の Document Definition へのリンクにすることもできます。セクションの型は&#x20;

        [**SectionDefinition::Type**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/sectiondefinition.md#type)

        &#x20;

        プロパティで設定します。
      </td>
    </tr>

    <tr>
      <td>
        **Warnings**
      </td>

      <td>
        [**StringsCollection**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/stringscollection.md)

        、[読み取り専用](https://docs.abbyy.com/ja/flexi-capture/sdk/guided-tour/properties.md#readonly-properties)
      </td>

      <td>
        直近の **Check** メソッド呼び出しで発生した警告の説明のコレクションを返します。全般的な警告のみが含まれます。
        Document Definition の特定のセクションの警告を取得するには、&#x20;

        [**ISectionDefinition::Warnings**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/sectiondefinition.md#warnings)

        &#x20;

        プロパティを使用します。
      </td>
    </tr>
  </tbody>
</table>

## メソッド

| **名前** | **説明** |
| - | - |
| [**Check**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/documentdefinition-check.md) | Document Definition のプロパティが正しく設定されているかどうかを確認します。 |
| [**Rearrange**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/documentdefinition-rearrange.md) | Document Definition のドキュメントウィンドウ内のデータを再配置します。field やセクションを追加し、その Document Definition を ABBYY FlexiCapture で開く予定がある場合に使用します。 **注:** このメソッドは Invoice プロジェクトではサポートされていません。 |

## 関連オブジェクト

![](https://mintcdn.com/abbyy/89WLEbAVqQ-ysQEU/images/flexi-capture/sdk/DocumentDefinition.gif?s=7fbd4799f1fc4a8a1f7ccc6e6b02777d)

## 出力パラメーター

このオブジェクトは、[**DocumentDefinitions**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/documentdefinitions.md) オブジェクトの [**AddNew**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/documentdefinitions-addnew.md)、[**AddNewFixed**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/documentdefinitions-addnewfixed.md)、[**FindByName**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/documentdefinitions-findbyname.md)、[**Item**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/item.md)、[**LoadFromFile**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/documentdefinitions-loadfromfile.md) の各メソッドの出力パラメーターです。

## 入力パラメーター

このオブジェクトは、[**DocumentDefinitions**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/documentdefinitions.md) オブジェクトの [**Delete**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/delete.md)、[**CheckIn**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/documentdefinitions-checkin.md)、[**CheckOut**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/documentdefinitions-checkout.md)、[**Delete**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/delete.md)、[**UndoCheckout**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/documentdefinitions-undocheckout.md) の各メソッドの入力パラメーターです。

## サンプル

このオブジェクトは、次のコード サンプルで使用されています：[分類](https://docs.abbyy.com/ja/flexi-capture/sdk/guided-tour/samples.md#classification)、[請求書の処理と学習](https://docs.abbyy.com/ja/flexi-capture/sdk/guided-tour/samples.md#invoicesprocessingandtraining)。

## 関連項目

[**DocumentDefinitions**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/documentdefinitions.md)

[ドキュメント定義の作成](https://docs.abbyy.com/ja/flexi-capture/sdk/guided-tour/creatingdocumentdefinitions.md)

[認識言語の設定](https://docs.abbyy.com/ja/flexi-capture/sdk/guided-tour/settinguprecognitionlanguages.md)

[エクスポートパラメーターの調整](https://docs.abbyy.com/ja/flexi-capture/sdk/guided-tour/exportparams.md)

[Propertiesの操作](https://docs.abbyy.com/ja/flexi-capture/sdk/guided-tour/properties.md)
