PDF Manager

PDF を結合

Documentize の .NET ツールを使って PDF を簡単に結合 — 複数のファイルを 1 つにまとめ、品質と構造を保持します。

Split PDF

Documentize の .NET ツールで PDF を簡単に分割 — ページを抽出し、新しいファイルを作成し、正確にドキュメントを管理

Compress PDF

Documentize PDF ManagerでPDFドキュメントを簡単に圧縮

PDFのページサイズを変更

Documentize PDF Manager で PDF ドキュメントのページサイズを簡単にリサイズ

PDFのページを回転

Documentize PDF Manager で PDF ドキュメントのページを簡単に回転できます

PDFの最適化

Documentize の .NET ツールを使って、PDF を簡単に最適化しましょう—ファイルサイズを削減し、パフォーマンスを向上させ、品質を維持します

テーブルの追加

Documentize の .NET ツールでプロフェッショナルな PDF テーブルを生成 — レイアウト、スタイル、データを簡単にカスタマイズできます。

TOC を追加

PDF ドキュメントの組織化とナビゲーションを向上させ、目次 (TOC) を動的に生成します

Use ChatGPT

Documentize の ChatGPT 統合を使用して AI で PDF を強化し、コンテンツをインテリジェントに生成、編集、分析します。

PDF Managerのサブセクション

PDF を結合

The Documentize PDF Manager for .NET is a versatile tool designed to merge multiple PDF documents into a single file. It simplifies the consolidation of PDF files, ensuring your documents are merged efficiently and maintaining consistency across content. The component handles internal resources such as fonts and images to optimize the merged document.

PDF の結合方法

To merge multiple PDF documents into a single file, follow these steps:

  1. Create an instance of MergeOptions to configure the merging process.
  2. Add input PDF files using the AddInput method.
  3. Add output PDF file using AddOutput method.
  4. Execute the merge using the Merge method of PdfManager class.
1// Create MergeOptions object to set instructions
2var options = new MergeOptions();
3// Add input file paths
4options.AddInput(new FileData("path_to_your_pdf_file_1.pdf"));
5options.AddInput(new FileData("path_to_your_pdf_file_2.pdf"));
6// Set output file path
7options.AddOutput(new FileData("path_to_result_pdf_file.pdf"));
8// Perform the process
9PdfManager.Merge(options);

主な機能:

  • Merge Multiple PDFs: Easily combine multiple PDF files into one.
  • Resource Optimization: Removes duplicate fonts and images during merging.
  • Batch Processing: Merge large batches of PDF documents in one go.

Split PDF

Documentize PDF Manager for .NET は、大きな PDF ドキュメントを小さく扱いやすいファイルに分割するプロセスを簡素化する強力なツールです。個別ページの抽出や、ドキュメントを特定のセクションに分割したい場合でも、このコンポーネントを使えば効率的かつ最小限の手間で実現できます。

How to Split PDF

PDF ドキュメントを個別ページに分割するには、以下の手順に従います。

  1. SplitOptions のインスタンスを作成して、分割オプションを設定します。
  2. AddInput メソッドで入力 PDF ファイルを追加します。
  3. AddOutput メソッドで各分割ページの出力ファイルを追加します。
  4. PdfManager クラスの Split メソッドを実行して、ドキュメントを分割します。
1// Create SplitOptions object to set instructions
2var options = new SplitOptions();
3// Add input file path
4options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
5// Set output file paths
6options.AddOutput(new FileData("path_to_result_pdf_file_1.pdf"));
7options.AddOutput(new FileData("path_to_result_pdf_file_2.pdf"));
8// Perform the process
9PdfManager.Split(options);

Key Features:

  • Split PDF by Page: PDF ドキュメントを個別ページに分割します。
  • Custom Split Options: 要件に合わせて分割プロセスを設定できます。
  • Organized Output: 各分割ページまたはセクションの出力ファイルを簡単に管理できます。

Compress PDF

PDF Manager は、先進的な最適化手法を通じて PDF ドキュメントを強化する包括的なツールです。これらの操作により PDF ドキュメントを圧縮し、保存、共有、閲覧を容易にします。

PDF の圧縮

未使用のページリソースの削除、同一資産の統合、冗長オブジェクトの破棄により、可能な限り PDF ドキュメントを圧縮します。

  1. 圧縮設定を構成するために CompressOptions オブジェクトを作成します。
  2. 入力ファイルを追加し、出力ファイルの場所を指定します。
  3. SetCropBox メソッドを使用してクロップ領域を定義します。
  4. PdfManagerCompress メソッドを実行します。
1// Create CompressOptions object to set instructions
2var options = new CompressOptions();
3// Add input file path
4options.AddInput(new FileData("path_to_your_pdf_file.pdf"));
5// Set output file path
6options.AddOutput(new FileData("path_to_result_pdf_file.pdf"));
7// Perform the process
8PdfManager.Compress(options);

主な機能:

  • 圧縮: 文書から未使用のページリソースやオブジェクトを削除します。

PDFのページサイズを変更

PDF Manager クラスを使用して PDF ドキュメントのページサイズをリサイズできます。ResizeOptions を作成し、希望するページサイズを設定してリサイズ処理を実行します。結果の PDF は新しい寸法を反映し、特定の要件に合わせて調整されます。

PDF のリサイズ

PDF ドキュメントのリサイズには、ResizeOptions クラスを使用して新しいページサイズを指定します。

  1. ページサイズを定義するために ResizeOptions オブジェクトを作成します。
  2. 入力ファイルを追加し、出力先を設定します。
  3. SetPageSize メソッドで新しいサイズ(例: A4)を指定します。
  4. PdfManagerResize メソッドを実行します。
 1// Create ResizeOptions object to set instructions
 2var options = new ResizeOptions();
 3// Set new PageSize
 4options.PageSize = PageSize.A3;
 5// Add input file path
 6options.AddInput(new FileData("path_to_your_pdf_file.pdf"));
 7// Set output file path
 8options.AddOutput(new FileData("path_to_result_pdf_file.pdf"));
 9// Perform the process
10PdfManager.Resize(options);

主な機能:

  • リサイズ: ページを特定の寸法に変更
  • 利用可能なサイズ: A0、A1、A2、A3、A4、A5、A6、B5、Letter、Legal、Ledger、11x17 インチ。

PDFのページを回転

PDF Manager クラスを使用して PDF ドキュメントのページを回転できます。RotateOptions を作成した後、目的のページ角度を設定し、処理を実行します。結果の PDF は新しい寸法が反映され、特定の要件に合わせて調整されます。

PDF を回転

RotateOptions クラスを使用して PDF ファイル内のページの向きを調整します。

  1. RotateOptions オブジェクトを作成し、回転角度を設定します。
  2. 入力 PDF ファイルを追加し、出力ファイルの場所を指定します。
  3. SetRotation メソッド(例: 90 度)で回転角度を設定します。
  4. PdfManagerRotate メソッドを実行します。
 1// Create RotateOptions object to set instructions
 2var options = new RotateOptions();
 3// Set new Rotation
 4options.Rotation = Rotation.On90;
 5// Add input file path
 6options.AddInput(new FileData("path_to_your_pdf_file.pdf"));
 7// Set output file path
 8options.AddOutput(new FileData("path_to_result_pdf_file.pdf"));
 9// Perform the process
10PdfManager.Rotate(options);

主な機能:

  • Rotation: PDF ページの向きを調整します。

PDFの最適化

The PDF Manager は、高度な最適化技術で PDF 文書を強化する包括的なツールです。ファイルサイズの削減、ページの回転、コンテンツのトリミング、文書のサイズ変更を支援するよう設計されています。これらの操作により、PDF ファイルの品質と管理性が向上し、保存、共有、閲覧が容易になります。最適化、または Web 用のリニアライズは、ウェブブラウザーでのオンライン閲覧に適した PDF ファイルにするプロセスを指します。

PDF の最適化

次の手順は、品質を維持しながら PDF 文書のファイルサイズを削減して最適化する方法を示しています。

  1. OptimizeOptions オブジェクトを作成して最適化設定を構成します。
  2. 入力 PDF ファイルを追加し、最適化されたファイルの出力先を設定します。
  3. PdfManagerOptimize メソッドを実行して最適化を実行します。
1// Create OptimizeOptions object to set instructions
2var options = new OptimizeOptions();
3// Add input file path
4options.AddInput(new FileData("path_to_your_pdf_file.pdf"));
5// Set output file path
6options.AddOutput(new FileData("path_to_result_pdf_file.pdf"));
7// Perform the process
8PdfManager.Optimize(options);

主な機能:

  • 最適化: 品質を損なうことなく PDF ファイルサイズを削減します。

テーブルの追加

Documentize PDF Manager for .NET は、PDF ドキュメントにテーブルを組み込む作業を効率化する汎用コンポーネントです。データの整理、フォームの設計、ドキュメントの可読性向上など、さまざまなシナリオで正確かつ迅速にテーブル作成をサポートします。

テーブル付き PDF の作成

TableOptions クラスを使用して PDF に構造化されたテーブルを作成する手順は次のとおりです。

  1. TableOptions オブジェクトを設定し、テーブルの構造・内容・入出力ファイルを定義します。
  2. テーブル、行、セルを PDF に追加します。
  3. AddTable メソッドでテーブル生成プロセスを完了します。

例として以下をご覧ください。

 1// Configure table options
 2var options = new TableOptions();
 3options.InsertPageBefore(1)
 4   .AddTable()
 5        .AddRow()
 6            .AddCell().AddParagraph("Name")
 7            .AddCell().AddParagraph("Age")
 8        .AddRow()
 9            .AddCell().AddParagraph("Bob")
10            .AddCell().AddParagraph("12")
11        .AddRow()
12            .AddCell().AddParagraph("Sam")
13            .AddCell().AddParagraph("20")
14        .AddRow()
15            .AddCell().AddParagraph("Sandy")
16            .AddCell().AddParagraph("26")
17        .AddRow()
18            .AddCell().AddParagraph("Tom")
19            .AddCell().AddParagraph("12")
20        .AddRow()
21            .AddCell().AddParagraph("Jim")
22            .AddCell().AddParagraph("27");
23// Add input file path
24options.AddInput(new FileData("path_to_input.pdf"));
25// Set output file path
26options.AddOutput(new FileData("path_to_output.pdf"));
27// Perform the process
28PdfManager.AddTable(options);

テーブルのページ指定

PDF の 2 ページ目の前にテーブルを作成する手順は以下の通りです。例を示します。

 1// Configure table options
 2var options = new TableOptions();
 3options.InsertPageBefore(2) // Add table before page 2
 4   .AddTable()
 5        .AddRow()
 6            .AddCell().AddParagraph("Name")
 7            .AddCell().AddParagraph("Age");
 8// Add input file path
 9options.AddInput(new FileData("path_to_input.pdf"));
10// Set output file path
11options.AddOutput(new FileData("path_to_output.pdf"));
12// Perform the process
13PdfManager.AddTable(options);

主な機能

  • 動的テーブル作成: PDF ドキュメント内に構造化されたテーブルを手軽に生成。
  • ページ配置: PDF の任意の位置に正確にテーブルを挿入。
  • レイアウトカスタマイズ: テーブル構造、セルの配置、スタイリングを自由に調整。

TOC を追加

The Documentize PDF Manager for .NET is a powerful component designed to enhance the organization and navigation of PDF documents by dynamically generating a Table of Contents (TOC). This component simplifies the process of adding TOCs to your PDFs, making documents easier to navigate and manage.

PDF の目次を生成する方法

PDF ファイルに目次を作成するには、次の手順を実行します。

  1. TocOptions のインスタンスを作成し、目次生成設定を構成します。
  2. Title プロパティでタイトルを設定します。
  3. Headings.Add メソッドで目次の見出しを設計します。
  4. AddInput メソッドで入力 PDF ファイルを追加します。
  5. AddOutput メソッドで目次付きの出力 PDF ファイルを指定します。
  6. AddTableOfContents メソッドを呼び出して目次を生成します。
 1// Create TocOptions object to set instructions
 2var options = new TocOptions();
 3// Set the Title
 4options.Title = "My Table of Contents";
 5// Design Headings
 6options.Headings.Add(new TocHeading("Introduction", 2));
 7options.Headings.Add(new TocHeading("Chapter I", 3));
 8options.Headings.Add(new TocHeading("Chapter II", 4));
 9options.Headings.Add(new TocHeading("Chapter III", 5));
10// Add input file path
11options.AddInput(new FileData("path_to_your_pdf_file.pdf"));
12// Set output file path
13options.AddOutput(new FileData("path_to_result_pdf_file.pdf"));
14// Perform the process
15PdfManager.AddTableOfContents(options);

PDF の目次にブックマークを生成する

ブックマーク生成には GenerateBookmarks プロパティを使用できます。

 1// Create TocOptions object to set instructions
 2var options = new TocOptions();
 3// Set the Title
 4options.Title = "My Table of Contents";
 5// Generate links in bookmarks
 6options.GenerateBookmarks = true;
 7// Design Headings
 8options.Headings.Add(new TocHeading("Introduction", 2, false, 1));
 9options.Headings.Add(new TocHeading("Chapter I", 3, true, 1));
10options.Headings.Add(new TocHeading("Chapter II", 4, true, 1));
11options.Headings.Add(new TocHeading("Example A", 4, true, 2));
12options.Headings.Add(new TocHeading("Example B", 4, true, 2));
13options.Headings.Add(new TocHeading("Example C", 4, true, 2));
14options.Headings.Add(new TocHeading("Example D", 4, true, 2));
15options.Headings.Add(new TocHeading("Chapter III", 5, true, 1));
16// Add input file path
17options.AddInput(new FileData("path_to_your_pdf_file.pdf"));
18// Set output file path
19options.AddOutput(new FileData("path_to_result_pdf_file.pdf"));
20// Perform the process
21PdfManager.AddTableOfContents(options);

結果をストリームとして取得する方法

 1// Create TocOptions object to set instructions
 2var options = new TocOptions();
 3// Set the Title
 4options.Title = "My Table of Contents";
 5// Design Headings
 6options.Headings.Add(new TocHeading("Introduction", 2, false, 1));
 7// Add input file path
 8options.AddInput(new FileData("path_to_your_pdf_file.pdf"));
 9// Set output stream 
10var outputStream = new MemoryStream();
11options.AddOutput(new StreamData(outputStream));
12options.CloseOutputStreams = false;
13// Perform the process
14PdfManager.AddTableOfContents(options);

TOC 見出しのカスタマイズ

TocHeading クラスを変更することで、目次の見出しをカスタマイズできます。たとえば GenerateNumbering を使用したり、手動で設定したりできます。 PageNumber プロパティはページへのリンクに使用されます。Level プロパティも利用可能です。

 1// Create TocOptions object to set instructions
 2var heading = new TocHeading();
 3heading.Text = "Intro";
 4heading.PageNumber = 5;
 5heading.GenerateNumbering = true;
 6heading.Level = 2;
 7var tocOptions = new TocOptions();
 8options.Headings.Add(heading);
 9// Add input and output files
10tocOptions.AddInput(new FileData("path_to_your_pdf_file.pdf"));
11tocOptions.AddOutput(new FileData("path_to_result_pdf_file.pdf"));
12// Generate the TOC with customized options
13PdfManager.AddTableOfContents(tocOptions);

主な機能

  • 動的 TOC 生成: 見出しやブックマークに基づいてエントリを自動生成し、任意の PDF ファイルに目次を作成します。
  • カスタマイズ: スタイル、書式設定、階層の深さなど、目次の外観と構造を自由に制御できます。
  • 効率的なワークフロー: 大規模または複雑な文書でも、手動で目次を作成する時間を最小限に抑えます。

Use ChatGPT

The Documentize PDF Manager for .NET plugin は、ChatGPT API を PDF アプリケーションに統合するよう設計された強力なツールです。このプラグインにより、開発者は入力メッセージに基づいてチャット応答を生成し、その出力を PDF 形式で保存できるため、PDF ドキュメント内で対話型インターフェイスや分析レポートを直接作成するのに適しています。

Generate Chat Responses

ChatGPT プラグインを使用してチャット応答を生成し、PDF ファイルに保存するには、次の手順に従ってください。

  1. ChatGptRequestOptions クラスのインスタンスを作成し、リクエストオプションを構成します。
  2. 入力および出力の PDF ファイルを追加します。
  3. API キーを設定し、最大トークン数や ChatGPT モデルへのクエリなどのパラメータを指定します。
  4. CreatePdfByChatGptRequestAsync メソッドを実行して、チャット完了を生成します。
 1var options = new ChatGptRequestOptions();
 2// Set output file path
 3options.AddOutput(new FileData("path_to_result_pdf_file.pdf")); 
 4options.ApiKey = "Your API key."; // You need to provide the key to access the API.
 5options.MaxTokens = 1000; // The maximum number of tokens to generate in the chat completion.
 6
 7// Add the request messages.
 8options.Messages.Add(new Message
 9{
10    Content = "You are a helpful assistant.",
11    Role = Role.System
12});
13options.Messages.Add(new Message
14{
15    Content = "What is the biggest pizza diameter ever made?",
16    Role = Role.User
17});
18
19// Process the request.
20var result = await PdfManager.CreatePdfByChatGptRequestAsync(options);
21
22var fileResultPath = result.ResultCollection[0].Data;
23var chatCompletionObject = result.ResultCollection[1].Data as ChatCompletion; // The ChatGPT API chat completion object.

Adding System and User Messages

よりインタラクティブな会話を作成するために、システムメッセージとユーザーメッセージの両方を追加できます。これらのメッセージは会話のコンテキストを形成するのに役立ちます。

  1. ChatGPT のコンテキストを設定するシステムメッセージを追加します。
  2. 会話のユーザー入力を表すユーザーメッセージを追加します。
 1var options = new ChatGptRequestOptions();
 2// Set output file path
 3options.AddOutput(new FileData("path_to_result_pdf_file.pdf"));
 4
 5// Add the PDF text source.
 6// In case of multiple sources, the text from each document will be added to the request message collection
 7// as a separate message with the role "user".
 8options.AddInput(new FileData("TextSource.pdf"));
 9
10options.ApiKey = "Your API key."; // You need to provide the key to access the API.
11options.MaxTokens = 1000; // The maximum number of tokens to generate in the chat completion.
12
13// Add the request message.
14// In this case, the system message with Content = "You are a helpful assistant." is added by default.
15// The role of the query message is "user" by default.
16options.Query = "How many letters in the provided text?";
17
18// Process the request.
19var result = await PdfManager.CreatePdfByChatGptRequestAsync(options);
20
21var fileResultPath = result.ResultCollection[0].Data;
22var chatCompletionObject = result.ResultCollection[1].Data as ChatCompletion; // The ChatGPT API chat completion object.

Key Features:

  • Chat Completions: カスタム入力に基づき ChatGPT API を使用して応答を生成します。
  • System & User Messages: システムコンテキストとユーザー入力の両方を提供し、動的な会話を実現します。
  • PDF Output: 生成されたチャット完了を構造化された PDF ファイルとして保存し、後続の利用が可能です。
  • Asynchronous Processing: 非同期でチャット完了を処理し、アプリケーションの応答性を確保します。
 日本語