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

# 手動分割

> Boxに保存されているPDFを、ユーザーが定義したページ範囲どおりにサブドキュメントに分割します。

export const MultiRelatedLinks = ({sections = []}) => {
  if (!sections || sections.length === 0) {
    return null;
  }
  return <div className="space-y-8">
      {sections.map((section, index) => <RelatedLinks key={index} title={section.title} items={section.items} />)}
    </div>;
};

export const RelatedLinks = ({title, items = []}) => {
  const getBadgeClass = badge => {
    if (!badge) return "badge-default";
    const badgeType = badge.toLowerCase().replace(/\s+/g, "-");
    return `badge-${badge === "ガイド" ? "guide" : badgeType}`;
  };
  if (!items || items.length === 0) {
    return null;
  }
  return <div className="my-8">
      {}
      <h3 className="text-sm font-bold uppercase tracking-wider mb-4">{title}</h3>

      {}
      <div className="flex flex-col gap-3">
        {items.map((item, index) => <a key={index} href={item.href} className="py-2 px-3 rounded related_link hover:bg-[#f2f2f2] dark:hover:bg-[#111827] flex items-center gap-3 group no-underline hover:no-underline border-b-0">
            {}
            <span className={`px-2 py-1 rounded-full text-xs font-semibold uppercase tracking-wide flex-shrink-0 ${getBadgeClass(item.badge)}`}>
              {item.badge}
            </span>

            {}
            <span className="text-base">{item.label}</span>
          </a>)}
      </div>
    </div>;
};

export const Link = ({href, children, className, ...props}) => {
  const localizedHref = localizeLink(href);
  return <a href={localizedHref} className={className} {...props}>
      {children}
    </a>;
};

手動分割は、ユーザーが定義したページ範囲どおりにPDFをサブドキュメントに分割します。

この分割タイプは、どのページをまとめるべきかがすでにわかっている場合に使用します。たとえば、標準化されたレイアウトの資料、オペレータによるレビュー済みのファイル、上流システムから提供されたページ範囲を使用するケースなどです。

## 前提条件

使用を開始する前に、<Link href="/guides/docgen/docgen-getting-started">Box Doc Genの使い方</Link>ガイドに記載されている手順に従って、Platformアプリを作成し、アクセストークンを生成してください。

以下も必要です。

* Boxにすでに格納されているソースPDF
* アプリが書き込み可能なBox上の保存先フォルダ
* 各出力ドキュメントのページ範囲。

境界が、固定のページ番号ではなく、コンテンツやマーカーに依存する場合は、代わりに<Link href="/guides/docgen/smart-split">スマート分割</Link>を使用してください。

## 構成するパラメータ

| パラメータ | 説明 |
| - | - |
| `source_file_id` | 分割対象のPDFのBoxファイルID |
| `destination_folder_id` | Boxが出力ドキュメントを保存するBoxフォルダID |
| `split_input.split_type` | `manual` |
| `split_input.split_definition` | 1つ以上のページ範囲。各範囲には`start`と`end`を指定します |

`{ start, end }`のペアごとに、1つの出力ドキュメントが作成されます。ページ番号は1から始まり、範囲にはstartとendの両方が含まれます。

## 例

14ページの営業資料があり、1～5ページ目の注文概要および6～14ページ目の添付資料と契約条件の2つに分割したいとします。この場合、対応する`split_definition`は次のようになります。

```json theme={null}
[
  { "start": 1, "end": 5 },
  { "start": 6, "end": 14 }
]
```

## 手動分割ジョブを作成する

```sh cURL theme={null}
curl -L 'https://api.box.com/2.0/document_splits' \
     -H 'Accept: application/json; version=1' \
     -H 'box-version: 2026.0' \
     -H 'Content-Type: application/json' \
     -H 'Authorization: Bearer <ACCESS_TOKEN>' \
     -d '{
       "source_file_id": "21040505661",
       "destination_folder_id": "10720019396",
       "input_source": "api",
       "split_input": {
         "split_type": "manual",
         "split_definition": [
           { "start": 1, "end": 5 },
           { "start": 7, "end": 9 }
         ]
       }
     }'
```

レスポンスには、分割ジョブのIDが含まれています。

```json theme={null}
{
  "id": "11678",
  "type": "document_split"
}
```

このIDを使用して、<Link href="/guides/docgen/doc-split">状態および生成されたファイルを取得</Link>します。

## ベストプラクティス

* 重複しないページ範囲を使用して、同じページが複数の出力ドキュメントに含まれないようにします。
* ページ範囲は、ソースPDFの読み取り順序に合わせてページ番号順に並べます。
* ページ番号がすでにわかっている場合は、結果が決定的であるため、手動分割を選択してください。
* 保存先フォルダには、`Splits / Customer A / 2026-07`のようなわかりやすい名前を付けます。そうすることで、レビュー担当者が出力をすぐに見つけることができます。

## 代わりにスマート分割を使うべき場面

以下の場合に<Link href="/guides/docgen/smart-split">スマート分割</Link>を選択します。

* 分割点をQRコードや区切りページで指定する。
* 署名ページや本人確認書類など、特定の種類の内容のみを保持する必要がある。
* ページ範囲がファイルごとに異なり、計算するより説明する方が簡単である。

<RelatedLinks
  title="関連するガイド"
  items={[
{ label: translate("Box Doc Split"), href: "/guides/docgen/doc-split", badge: "GUIDE" },
{ label: translate("Smart split"), href: "/guides/docgen/smart-split", badge: "GUIDE" }
]}
/>
